-3

http://127.0.0.1:8887/mysite/Products/?cat=Daily%20Needs&subCat=Cosmetics&brand=Ponds&prodName=Winter&sz=2&sw=1349

i want an htaccess which can change it to look like http://127.0.0.1:8887/mysite/Products/

also it should keep the query intact so that i can use it in the page

Uday
  • 1
  • 1
    Seems to me you want to hide parameters. Shouldn't you be looking at POSTing your parameters instead of using GET? – patrick Aug 05 '17 at 08:32

1 Answers1

0

use it and enjoy :

RewriteEngine On
RewriteBase /

# Redirect /index?id=2 to /index/2
RewriteCond %{THE_REQUEST} ^[A-Z]{3,}\s/+index\?id=([^&\s]+) [NC]
RewriteRule ^ /index?%1 [R=302,L]

RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME}\.php -f
RewriteRule ^(.*)$ $1.php [QSA,L]
  • This is not what the OP is asking for. It seems he wants to hide all parameters, not just change them into what looks like a sub folder structure... – patrick Aug 05 '17 at 08:34