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

  • 1
    I remember adding "But first please find the duplicate (which exist!)" to my comment. – Martijn Nov 24 '14 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 '14 at 8:58
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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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