1

The current URL: http://www.example.com/product.php/sample-product.html.

I want change it to: http://www.example.com/sample-product.html

2
  • 1
    I remember adding "But first please find the duplicate (which exist!)" to my comment.
    – Martijn
    Nov 24, 2014 at 8:57
  • 2
    Apart from that, what is your code now? What have you tried so far? Is there a reason why you think this might not work?
    – Martijn
    Nov 24, 2014 at 8:58

1 Answer 1

2

You can remove it with URL Rewriting like that :

<IfModule mod_rewrite.c>
        RewriteEngine On
        RewriteBase /

        RewriteCond %{REQUEST_FILENAME} !-f
        RewriteCond %{REQUEST_FILENAME} !-d
        RewriteRule ^(.*)$ /product.php/$1 [L]
</IfModule>

Place this code in .htaccess at root.

0

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.