Forum Moderators: phranque
ie www.site.com/product_info.php?products_id=116&osCsid=763513de109cf66b5c88186802d1db2d
to
www.site.com/product/WhateverIChose.html&osCsid=763513de109cf66b5c88186802d1db2d
Anyone have any clue cuz Ive been busting my head for 4 days reading manuals and tutorials with little to no avail.
For more information, see the policies and documents cited in our forum charter [webmasterworld.com].
You will need the concepts of "back-reference" and the use of RewriteCond %{QUERY_STRING} to start.
Jim
To my reading, this should take site.com/product28 and change the url in the address bar to /product/name1.html while still loading the data from product/28/
The only ways to change the URL in the browser address bar are to either redirect the client or to change the links on your pages. This latter approach is what most Webmasters want to do.
The links published on your pages are what show in the browser address bar.
The usual point of confusion about this is the assumption that mod_rewrite is an "output content modifier" -- that it somehow modifies the content of pages being sent back to the browser. But mod_rewrite does not do this. Instead it acts just after a request is received by the server, and does one of three things: It either changes the internal server filepath associated with a requested URL, issues a redirect or error response to the client, or performs a proxy throughput to a different server. This all happens during the URL-to-filename translation phase of the Apache API, before any content is served and before any scripts are invoked.
So the usual approach to change the URL in the address bar goes like this:
For more information on a problem closely related to this one, see this thread [webmasterworld.com] in our Apache Forum Library.
Jim