Forum Moderators: phranque
Thanks if you can help me!
BR
Ferraglia
The old one or the new one?
.
If it is the new URLs, you'll need all internal site navigation to point to the new URLs, and set up a 301 redirect rule to redirect all requests for old URLs to their new version. The redirect caters for existing listings in the SERPs, existing incoming links, and stored bookmarks alike. There will be a brief loss of rankings as old pages are de-indexed and the new URL is re-indexed.
If it is the old URLs, you will need to set up an internal rewrite that pulls the new *filenames* from the server when you request the old *URLs*. You will also need to set up an external 301 redirect that redirects from the new "URLs" to the old URLs, otherwise you will have a duplicate content problem on your hands. There will be no loss of rankings.
Options +FollowSymLinks
RewriteEngine On
RewriteCond %{QUERY_STRING} ^sid=(.*)$
RewriteRule ^article\.php$ index.php?option=com_content&task=view&id=%1 [R=301,L]
...but without complete luck.
Have you got any solution?
BR
Ferraglia
Also, the (.*) subpattern and back-reference will include *everything* that follows "sid=" -- including all the other query parameters if they are present.
I think you'd be happier with something like this:
RewriteCond %{QUERY_STRING} &?sid=([^&]+)
RewriteRule ^article\.php$ index.php?option=com_content&task=view&id=%1 [R=301,L]
Jim