Reputation: 167
My client old webpage has www.domain.com/client/default.asp?wa_id=558&wa_object_id=1&wa_id_key=25092d5959fd9f212d5c0f63a5f0efb2
kind of URLs.
Now we have installed a new CMS and we want to main keep old URLs by converting URLs.
I want to write .htacess URL what does next
client/default.asp?wa_id=558&wa_object_id=1&wa_id_key=25092d5959fd9f212d5c0f63a5f0efb2
converts to
index.php?id=client/default.asp?wa_id=558&wa_object_id=1&wa_id_key=25092d5959fd9f212d5c0f63a5f0efb2
I tried this but
RewriteRule ^client/(.*)$ index.php?id=$1 [L]
result is
index.php?id=client/default.asp
Upvotes: 2
Views: 165
Reputation: 165148
Just add QSA flag:
RewriteRule ^client/(.*)$ index.php?id=$1 [QSA,L]
http://httpd.apache.org/docs/current/rewrite/flags.html#flag_qsa
Upvotes: 2