user5686475
user5686475

Reputation:

Hide Query String In Php using .htaccess

I have This Type Of Url http://www.localhost:82/frontend/productview?product_name=Purse

I Want To Hide Url And Look Like : http://www.localhost:82/frontend/productview There Is Any Way To Hide This Query String If Yes Then Please Give Me Solution.

Thanks In Advance.....

Upvotes: 0

Views: 78

Answers (1)

jned29
jned29

Reputation: 478

Try this

RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_HOST}  ([^/]+)\.example\.com.*
RewriteCond %{REQUEST_URI}  ^/([^/]+)$
RewriteRule .*  http://www.localhost:82/frontend/productview [L]

Upvotes: 2

Related Questions