0

I have a .htaccess file with a basic rewrite rule wich works fine on my local stack, but it does not work on the shared server.

RewriteRule ^wp-content|wp-login/? - [L,R=404]

What am I missing?

12
  • Your server or shared server? Commented Mar 7 at 21:11
  • 1
    Most probably, your server has a AllowOverride None directive in the Apache configuration file. If you want to be able to use htaccess, you need to change it to AllowOverride All Commented Mar 7 at 21:16
  • 1
    Another possible reason is you don't have mod_rewrite active on the server. Commented Mar 7 at 21:18
  • @Luis Alberto Barandiaran thank you will check later and update.
    – Thomas
    Commented Mar 7 at 21:31
  • "it does not work" - What happens exactly? What other directives do you have in the .htaccess file? And where have you placed this rule? Are there any other .htaccess files along the directory path? Is this a WordPress site? Are you using pretty permalinks?
    – MrWhite
    Commented Mar 7 at 21:32

0

Your Answer

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

Browse other questions tagged or ask your own question.