Forum Moderators: phranque
I am trying to learn the basics on the mod_rewrite function, and already have read many things so far. The only problem is, I cannot seem to get things working. I will explain my situation, and paste the error logs.
My current setup is Apache 1.3.22 running on Windows 2000.
The path of the htdocs-path is the following:
c:/program files/apache group/apache/htdocs
The rewrite logfile is located at c:/rewrite/rewrite.log
I have 2 files in a directory called test:
c:/program files/apache group/apache/htdocs/test
one of them is day.html, the other one is night.html
In this directory, I also have a .htaccess file, with the following content:
rewriteBase /test/
rewriterule ^day.html night.html
But this gives me the following error message:
127.0.0.1 - - [06/Dec/2002:17:07:47 +0100] [www.testing.nl/sid#7859b0][rid#86a408/initial] (2) init rewrite engine with requested uri /test/day.html
127.0.0.1 - - [06/Dec/2002:17:07:47 +0100] [www.testing.nl/sid#7859b0][rid#86a408/initial] (1) pass through /test/day.html
And simply shows day.html in my browser...
How do I make night.html appear eventhough I entered day.html in the browser window?
I have had a bit of help on this one lately
[webmasterworld.com...]
Do you have the Rewrite engine on?
Also
rewriterule ^day\.html$ /night.html
So when you look for day you get night but the URLsays day.
I think that is it. Read the post above for some good help off Jim.
Cheers
Welcome to WebmasterWorld [webmasterworld.com]!
You might want to try these two variants - post your relevant log and error file results if neither works:
Options +FollowSymlinks
RewriteEngine on
RewriteBase /test
RewriteRule ^day\.html /night.html [L]
Options +FollowSymlinks
RewriteEngine on
RewriteRule ^day\.html /night.html [L]
Jim