I'm trying to perform an internal rewrite of example.com/abc to example.com/?//abc where 'abc' can by any string.
Tried the following rule:
RewriteEngine On
RewriteRule ^(\w+)/?$ /?//$1 [L,QSA,NC,PT]
However this is not redirecting as expected. From the logs, I can see the following entries:
applying pattern '^(\\w+)/?$' to uri 'abc
rewrite 'abc' -> '/?//abc'
split uri=/?//abc -> uri=/, args=//abc
internal redirect with / [INTERNAL REDIRECT]
applying pattern '^(\\w+)/?$' to uri ''
Not sure, why it's splitting the pattern to uri and arg based on '?'. Can any one help