Welcome to WebmasterWorld Guest from 50.16.84.67

Forum Moderators: Ocean10000 & incrediBILL & phranque

mod_rewrite question from a beginner

   
4:07 pm on Dec 6, 2002 (gmt 0)

10+ Year Member



Hi people,

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?

4:11 pm on Dec 6, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Hello

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

4:15 pm on Dec 6, 2002 (gmt 0)

10+ Year Member



Well, I think rewriteEngine must be on, otherwise it wouldn't produce a logfile would it?

I have changed my .htaccess file into:

rewriteBase /test/
rewriteRule ^day\.html$ /night.html

Like you told me, but it keeps displaying day.html, and keeps displaying the same loginfo...

4:52 pm on Dec 6, 2002 (gmt 0)

WebmasterWorld Senior Member jdmorgan is a WebmasterWorld Top Contributor of All Time 10+ Year Member



designaweb,

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

5:07 pm on Dec 6, 2002 (gmt 0)

10+ Year Member



Seems to work now, thanx!
 

Featured Threads

Hot Threads This Week

Hot Threads This Month