Reputation: 727
I have URL as: spa-shop/admin/index?docid=abc
,For this URL i am using htacces Rewrite Rule.
The rule is as follow:
RewriteRule ^((?i)spa-shop)/(admin)/([a-zA-Z\?]*)$ spavendor/index.php?url=spaAdmin/$3 [L]
In this the output which i am expecting is : spashop/index.php?url=spaAdmin/index?docid=abc
,
but I am getting the URl as: spashop/index.php?url=spaAdminShop/index
. Please let me know what is the problem though i am escaping the ? in the rewrite rule. But it seems not being escaped.
Upvotes: 2
Views: 104
Reputation: 786021
You can replace your rule by this rule:
RewriteRule ^(spashop)/admin/([a-zA-Z]+)/?$ $1/index.php?url=spaAdminShop/$2\?%{QUERY_STRING} [L,NC]
Upvotes: 0