0

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.....

3
  • 1
    Sow us the code. And what does it have to do with MySQL? Commented Jan 30, 2019 at 5:37
  • What framework/webserver (configuration)? If you have a shorted URL where does the product_name=Purse get to the back end? While you could use POST requests GET requests are better because they are cacheable (client and reverse proxy side). Commented Jan 30, 2019 at 5:44
  • If you need the info that the product name is "Purse", then you need to have that information somewhere in your URL. Commented Jan 30, 2019 at 8:26

1 Answer 1

2

Try this

RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_HOST}  ([^/]+)\.example\.com.*
RewriteCond %{REQUEST_URI}  ^/([^/]+)$
RewriteRule .*  http://www.localhost:82/frontend/productview [L]
Sign up to request clarification or add additional context in comments.

1 Comment

I Am Finding Many Way And Spending Lots Of Hour For This ..Thank u So Much

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.