Forum Moderators: phranque
Then, in order to clean up ugly URLs and avoid PageRank and link-popularity dilution due to duplicate content in the search engines, the old "real" URIs are externally 301-redirected to the friendly URIs.
In mod_rewrite, it is necessary to use the server variable {THE_REQUEST} in order to avoid the 'infinite' loop that would result from an improper implementation of the above strategy. Oops! - That's technical. :)
Jim
RewriteCond %{THE_REQUEST} /ProductDetails\.php\?pid=(\d*)
RewriteRule (.*ProductDetails\.php)/Products/%1//Details.html [R]
The rewrite works fine with one exception:
[mysite.com...]
becomes
[mysite.com...]
How can I prevent that?pid=123 at the end of the rewritten URL?