mod_rewrite

Problems with the Linux version of XAMPP, questions, comments, and anything related.

mod_rewrite

Postby bdeonline » 30. March 2005 18:31

I'm needing to use mod_rewrite to capture get request and instead redirect to a page named with the get request.

Example:
test.htm?id=5

Needs to be:
test.htm?id=5.htm

Here is what I have so far:
Code: Select all
RewriteRule ([a-z0-9]+).htm?([a-z0-9]+)=([a-z0-9]+)$ $1.htm?$2=$3.htm
bdeonline
 
Posts: 5
Joined: 12. March 2005 22:50

Postby bdeonline » 30. March 2005 19:18

Reading some more I need {THE_REQUEST} to just add a .htm ending
bdeonline
 
Posts: 5
Joined: 12. March 2005 22:50

Postby LiNx » 30. March 2005 20:38

I don't really understand what you're going to be using this for, but is there any reason why you can just add ".htm" to the end of the id variable?
LiNx
 
Posts: 12
Joined: 11. February 2005 22:15

Postby bdeonline » 30. March 2005 21:12

I need to make a dynamic site, static.

Using wget I was going to download all the files to the site. Which come with there get request just add .htm to the end and have mod rewrite go to the static page besides a dynamic one.

So each request for test.htm?id=2 would go to a html page called test.htm?id=2.htm
bdeonline
 
Posts: 5
Joined: 12. March 2005 22:50

Postby LiNx » 30. March 2005 22:38

Okay. I see now.
LiNx
 
Posts: 12
Joined: 11. February 2005 22:15


Return to XAMPP for Linux

Who is online

Users browsing this forum: No registered users and 6 guests