Forum Moderators: phranque
I'm trying to redirect (virtual) subdomains to variables as follows :
Options +FollowSymlinks
RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_HOST} .
RewriteCond %{HTTP_HOST}!^www\. [NC]
RewriteCond %{HTTP_HOST} ^([^.]+)\domain\.com [NC]
RewriteRule ^(.*) /index.php?page=%1 [L]
But it doesn't work!
Can anyone PLEASE tell me what's wrong with my code?
I use Apache 1.3.34
Options +FollowSymLinks
RewriteEngine on
RewriteBase /
#
RewriteCond $1 !^index\.php$
RewriteCond %{HTTP_HOST} !^www\. [NC]
RewriteCond %{HTTP_HOST} ^([^.]+)\.domain\.com [NC]
RewriteRule (.*) /index.php?page=%1 [L]
Jim
RewriteRule (.*) http://www.example.com/index.php?page=%1 [R=302,L]
Jim