.htaccess blocking admin features for admin users
-
Hey mates. I’ve been looking for a code to hide the file extensions from URLs and I came across this one:
<IfModule mod_rewrite.c> ## Go Daddy servers need the Options -MultiViews code below Options -MultiViews RewriteEngine On RewriteBase / # To externally redirect /dir/foo.php to /dir/foo RewriteCond %{REQUEST_METHOD} !POST RewriteCond %{THE_REQUEST} ^[A-Z]{3,}\s([^.]+)\.php [NC] RewriteRule ^ %1 [R,L,NE] ## To internally redirect /dir/foo to /dir/foo.php RewriteCond %{REQUEST_FILENAME}.php -f [NC] RewriteRule ^ %{REQUEST_URI}.php [L] </IfModule>
This .htaccess code was working beautifully until I found out that for some reason this was blocking admin features in my admin account, meaning I couldn’t activate/deactivate plugins, add/edit/delete users and so on. So I was forced to remove the .htaccess file and now I have the .php extensions back in my URLs. Eg. I currently have myexample.com/contact.php whereas I’d rather have myexample.com/contact.
Is there a way of hiding the extensions from my URLs without losing my WP admin capabilities? Cheers.
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘.htaccess blocking admin features for admin users’ is closed to new replies.