Forum Moderators: phranque

Message Too Old, No Replies

Rewrite help

         

pheonix123

11:46 am on Apr 5, 2008 (gmt 0)

10+ Year Member



Hi, I have the following url:

[blah.com...]

How do I rewrite it so it just shows as:

[blah.com...]

Tried searching with no success :(

jdMorgan

3:05 am on Apr 6, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Shorten the query string written into the links on your pages by modifying your script.

Then use mod_rewrite, and use a RewriteCond to test and create a back-reference to the query string, and then add the "zoom_" part to the query string in the RewriteRule, and use the result to call your script. Of course, you could forgo this mod_rewrite coding, and simply make this change in your script as well.

The important point is this: mod_rewrite cannot change the URLs that appear in links on your pages. It can only detect those URLs once your link is clicked and that URL is requested from your server, and either redirect the client to a different URL, or modify the server filepath used to serve content for that requested URL.

Jim