0

I have a folder called /mf/ that is not related to the wordpress install but it is in the same root folder. When I visit the folder path (www.domain.com/mf) it gives me a 500 error. I know that this is an .htaccess issue.

I've modded my root .htaccess to do the below code but it still does not work:

 <IfModule mod_rewrite.c>
 RewriteEngine On
 RewriteBase /
 RewriteCond %{REQUEST_URI} ^/mf/(.*)$ [OR]
 RewriteRule ^.*$ - [L]
 </IfModule>


 # BEGIN WordPress
 <IfModule mod_rewrite.c>
 RewriteEngine On
 RewriteBase /
 RewriteRule ^index\.php$ - [L]
 RewriteCond %{REQUEST_FILENAME} !-f
 RewriteCond %{REQUEST_FILENAME} !-d
 RewriteRule . /index.php [L]
 </IfModule>
 # END WordPress

Any advice on how to fix this .htaccess issue?

10
  • Why an [OR] flag on the last condition? I doubt that is valid syntax. Commented Dec 4, 2017 at 19:34
  • @Sumurai8 i saw it in a reference doc, any suggestions on the correct syntax? Commented Dec 4, 2017 at 20:09
  • The [OR] flag implies that "if this condition is not met, do not stop processing this rule but check if the next condition is met". However, there is no next rule. You should remove that flag. Commented Dec 4, 2017 at 20:22
  • @Sumurai8 i've removed the OR flag. Still does not work properly unfortuantely. Thank you for the explanation! Commented Dec 4, 2017 at 20:25
  • What does the apache error log say in that case? Commented Dec 4, 2017 at 20:25

1 Answer 1

1

in your "mf" folder create a .htaccess file and there put all the configuration that nedded, and in the main folder-wordpress put only the wordpress part.

in th "mf" change the RewriteBase too.

main-wordpress

# BEGIN WordPress
 <IfModule mod_rewrite.c>
 RewriteEngine On
 RewriteBase /
 RewriteRule ^index\.php$ - [L]
 RewriteCond %{REQUEST_FILENAME} !-f
 RewriteCond %{REQUEST_FILENAME} !-d
 RewriteRule . /index.php [L]
 </IfModule>
 # END WordPress

the mf folder

<IfModule mod_rewrite.c>
 RewriteEngine On
 RewriteBase /mf/
 RewriteCond %{REQUEST_URI} ^/mf/(.*)$ [OR]
 RewriteRule ^.*$ - [L]
 </IfModule>
Sign up to request clarification or add additional context in comments.

1 Comment

thank you for the explanation, i realized the mod_rewrite should also be in the /mf/ folder. it works now.

Your Answer

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

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.