I have .htaccess file with the code:
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule (.*) ?p=$1 [L]
but I want it to convert not only URI string to a get parameter p but also all other get parameters to p, in other words:
domain.com/somewhere/somepage.html?foo=2 —->
domain.com/?p=urlencoded(somewhere/somepage.html?foo=2)
How can I do that?
Use following code in .htaccess file
Since
NEflag is not provided here so mod_rewrite engine will encode your original URI before internally redirecting.