Hi All
I am trying to get to grips with Apache's mod rewrite. I am having trouble getting the most basic of rewrites to work.
I have created two pages (1.htm and 2.htm) with unique content on my local server.
I have the following in my .htaccess
RewriteEngine on
RewriteBase /test/
RewriteRule ^1\.htm 2.htm [R]
Now when I call 1.htm it appends the whole physical path to the page and so results in an error
Eg
The error is a 403:
So it is sort of looking for the right file i guess but still no cigar.
Any hints gratefully received. If I can't get this right how the hell am I going to make ?id=X into /x.htm
Cheers,
micmac
I am trying to get to grips with Apache's mod rewrite. I am having trouble getting the most basic of rewrites to work.
I have created two pages (1.htm and 2.htm) with unique content on my local server.
I have the following in my .htaccess
RewriteEngine on
RewriteBase /test/
RewriteRule ^1\.htm 2.htm [R]
Now when I call 1.htm it appends the whole physical path to the page and so results in an error
Eg
The error is a 403:
Code:
Forbidden
You don't have permission to access /c:/phpdev/[URL unfurl="true"]www/test/2.htm[/URL] on this server.
So it is sort of looking for the right file i guess but still no cigar.
Any hints gratefully received. If I can't get this right how the hell am I going to make ?id=X into /x.htm
Cheers,
micmac