Forum Moderators: phranque
DocumentRoot "C:/htdocs"
<Directory "C:/htdocs">
I have enabled mod_rewrite and i created this: [localhost...]
inside i have the .htaccess:
RewriteEngine on
Options +FollowSymlinks
RewriteRule ^nu.html$ da.html [R]
so it should redirect nu.html to da.html (http://localhost/test/da.html), but instead it redirects to:
[localhost...]
Can you please enlighten me how to solve this? the rest i can learn from web, but i haven' discovered this on www.
Thanks in advance
RewriteRule ^nu.html$ da.html [R]
Believe the above line should read:
RewriteRule ^nu.html$ [mydomain.com...] [R]
RewriteRule ^nu\.html$ http://www.mydomain.com/da.html [R=301,L]
Jim
i noticed that on a linux server i can put:
RewriteRule ^nu.html$ da.html [R]
and it works perfectly. it redirects to da.html
Can i do this on XP?
i do not want to use
RewriteRule ^nu.html$ [localhost...] [R]
because this would mean to have different .htaccess for localhost and server. I want to have the same settings for mod_rewrite, is this possible?
If you have multiple hosts to which you wish to apply this rule, you can always use the substitution URL construct
RewriteRule ^foo\.html$ http://[b]%{HTTP_HOST}[/b]/bar.html [R=301,L]
Jim