Forum Moderators: phranque
http://www.example.com/?page=confidentiality&id=12345
And they need to look like this:
http://www.example.com/confidentiality.html?id=12345
I tried this:
RewriteRule ^?page=confidentiality$ confidentiality.html
but got this on all my pages:
Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator, webmaster@example.com and inform them of the time the error occurred, and anything you might have done that may have caused the error.More information about this error may be available in the server error log.
Additionally, a 500 Internal Server Error error was encountered while trying to use an ErrorDocument to handle the request.
--------------------------------------------------------------------------------
Apache/1.3.31 Server at www.example.com Port 80
as I (obviously) have no idea what I'm doing, I am in need of some real help here...
I checked here:
but it didn't seem to have quite what I was looking for.
My reason for doing this is that I've just recently re-vamped my site and it no longer uses "?page=", just static pages (created dynamically in the background) but I've got several customers who have already recieved emails with the "?page=confidentiality" link in them.
I'm also not sure how to maintain the id during the rewrite... it's got to go from "&id=12345" to "?id=12345" and not get lost along the way.
Anybody got any ideas?
Thanks for any and all help in advance.
-JL
*all instances of my website have been replaced with "www.example.com" as they mess with the url's anyways
[edited by: jdMorgan at 12:48 am (utc) on Oct. 1, 2004]
[edit reason] Removed specifics per TOS [/edit]
Maybe I'm going about this the wrong way...
I'm thinking maybe instead of a mod_rewrite that maybe I could add some php code to the top of my home page (which is what loads if I have http://www.example/?page=confidentiality) that would detect the page variable and kick the visitor to the correct page...
I'm going to have to play with that maybe.
[edited by: jdMorgan at 12:45 am (utc) on Oct. 1, 2004]
[edit reason] Removed specifics per TOS [/edit]
RewriteCond %{QUERY_STRING} page=(.+)&id=(.+)
RewriteRule ^$ /%1.html?id=%2 [L]
Jim