Reputation: 23
I'm having some issues with the following task:
Redirect from:
example.com/catalog/index.php/cPath/24?osCsid=gvil7l7h2vu910f787248i14j4
To:
example.com/mysitenew/index.php?dest=products&cat=24
The trick is to take the number after cPath/
and strip out the ?
and everything after it.
I have tried back and forth with regex in RewriteRule
but I am not an expert and any suggestions would be appreciated.
Upvotes: 1
Views: 939
Reputation: 785146
Put this code in your DOCUMENT_ROOT/.htaccess
file:
RewriteEngine On
RewriteRule ^catalog/index\.php/cPath/([^/]+)/?$ /mysitenew/index.php?dest=products&cat=$1 [L,R=302]
Upvotes: 2