I have an URL like:
base_url/cloths/mens.php
now when we click on this above URL then it should redirect to:
base_url/wp/cloths/mens/
here we want to remove .php
extension from URL after redirecting.
Note: we are clicking base_url/cloths/mens.php
from Magento but base_url/wp/cloths/mens/
is post of WordPress.
We have written like:
Redirect 301 /cloths /wp/cloths
Here URL is redirecting properly but at the end of URL .php
is getting append.
We have also tried this but didn't worked:
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^([^\.]+)$ $1.php [NC,L]
How can we remove the .php
part from the URL?