Reputation: 575
I want to convert last /
to ?
for a url.
For eg. : /custom/2342546578
to custom?2342546578
using htaccess rule.
where custom
is my page and last string is the unique id for customer identification.
How to use htaccess rule for redirection?
Upvotes: 1
Views: 39
Reputation: 41219
You can use the following RewriteRule
in your root/.htaccess
RewriteRule ^custom/([A-Za-z0-9]+)/?$ /custom?$1 [L]
This will rewrite your url from /custom/123
to /custom?123
.
Upvotes: 1