i have redhat linux server and i was using /var/www/html to display my site.
By using the following directive rewrite mod was working fine.
<IfModule mod_rewrite.c>
# Enable mod_rewrite engine
RewriteEngine on
# WITH mandatory 'www.'
#RewriteCond %{HTTP_HOST} ^$uri\.$tld$ [NC]
#RewriteRule ^(.*)$ http://www.$domain$1 [L,R=301]
# WITHOUT 'www.'
RewriteCond %{HTTP_HOST} ^www\.$uri\.$tld$ [NC]
RewriteRule ^(.*)$ http://$domain/$1 [L,R=301]
</IfModule>
After the addition of
NameVirtualHost *:80
<VirtualHost *:80>
ServerName www.domainmaster.com
ServerAlias domainmaster.com *.domainmaster.com
DocumentRoot /var/www/domainmaster
</VirtualHost>
<VirtualHost *:80>
ServerName www.domainother.com
ServerAlias domainother.com *.domainother.com
DocumentRoot /var/www/domainother
</VirtualHost>
url rewrite doesn't work. Website files wasn't modified. .htaccess file redirects all traffic to index.php and index.php decides which page to display.
Any ideas?
$uri,$tldand$domain? These domains are presumably intended to be separate (different .htaccess files etc)? – w3d Jan 23 at 8:49