Redirect all php files to wordpress posts or strip .php extension

If you need to redirect your old urls which are like

alabala.com/see-this-post.php to alabala.com/see-this-post/

You can use this simple .htaccess redirect

RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)\.php$ /$1/ [l,R=301,NC]

С етикет: , , ,
Публикувано в wordpress

Вашият коментар

Вашият имейл адрес няма да бъде публикуван.

*