Forum Moderators: phranque
Please give me references or show me how to do that.
Thanks in advance!
The links on your pages define the URLs, so you must change your pages -- PHP preg_replace often comes in handy for this, and some shopping carts and CMS systems may have 'plugins' available to do this for you.
Once the URLs are changed, mod_rewrite is used to recognize requests for the new URLs, and 'map' them to your script so that the requested page can be generated correctly.
In a third (optional) step, you can redirect direct client requests for the old ugly URLs back to the new pretty versions. This takes care of previously-bookmarked and linked URLs, and speeds up search engine replacement of your old ugly URLs with the new pretty ones.
Jim
A rewrite takes a request for a URL and maps that request to an internal server filepath, without revealing what that path actually is.
A redirect takes a request for a URL and tells the browser to request a new and different URL, additionally returning a 301 or 302 status.