I have searched the forums for a solution for the following problem:
I relocated the contents of my webroot to a subdirectory and have placed another CMS that uses its own URL structure.
I want all document requests with the following:
- Code: Select all
index.php?action=
To be redirected to the same document but in the subdirectory.
The real urls contain a query string like the following URL:
- Code: Select all
http://www.example.com/index.php?action=listingview&listingID=23
The result I seek is the following:
- Code: Select all
http://www.example.com/listings/index.php?action=listingview&listingID=23
I have tried various and sundry versions of the following to redirect it with no success:
- Code: Select all
Options +FollowSymLinks
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php\?action=(.*)$ subdir/index.php?action=$1 [R=301,L]
I can't use a rule to rewrite every url in the webroot as it will screw up friendly urls in the new content of the root.
Thanks in advance for the help.