• Resolved larnellc

    (@larnellc)


    When I create a secure htaccess file, how do I exclude the wordpress redirect block? I inherited a wordpress install which has the htaccess file in a directory about the wordpress directory. I can use your plugin to secure the site but I’ve discovered having the wordpress redirect lines in both htaccess files creates a conflict.

    The lines I’m referring to are:

    # WP REWRITE LOOP START
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    
    # add a trailing slash to /wp-admin
    RewriteRule ^wp-admin$ wp-admin/ [R=301,L]
    
    RewriteCond %{REQUEST_FILENAME} -f [OR]
    RewriteCond %{REQUEST_FILENAME} -d
    RewriteRule ^ - [L]
    RewriteRule ^(wp-(content|admin|includes).*) $1 [L]
    RewriteRule ^(.*\.php)$ wp/$1 [L]
    RewriteRule . index.php [L]

    The error I get when this block is in both the root htaccess and the /wordpress access is.

    Request exceeded the limit of 10 internal redirects due to probable configuration error. Use ‘LimitInternalRecursion’ to increase the limit if necessary. Use ‘LogLevel debug’ to get a backtrace.

    Thanks

    https://www.ads-software.com/plugins/bulletproof-security/

Viewing 5 replies - 16 through 20 (of 20 total)
  • Thread Starter larnellc

    (@larnellc)

    If you find out why there are two versions of the code on this page, could you keep the community updated?

    https://codex.www.ads-software.com/Multisite_Network_Administration#.htaccess_and_Mod_Rewrite

    https://codex.www.ads-software.com/htaccess#Multisite

    Plugin Author AITpro

    (@aitpro)

    Both “examples” are correct and what is not made crystal clear is that if a Network/Multisite is a GWIOD site type then the WordPress installation folder name will be dynamically created. ie if your WordPress installation folder was “wp” then you would see this code: RewriteRule ^(.*\.php)$ wp/$1 [L]. If you had a standard Network/Multisite WordPress installation then you would see this code: RewriteRule ^(.*\.php)$ $1 [L].

    So both are correct examples, but the explanation/description does not make that clear. The examples are just general examples and are not supposed to be taken literally as the only code that will be dynamically created or seen on a particular website.

    Plugin Author AITpro

    (@aitpro)

    Technically I think this example is a typo: RewriteRule ^(.*\.php)$ wp/$1 [L] and was intended to be this example line of code: RewriteRule ^(.*\.php)$ $1 [L].

    Plugin Author AITpro

    (@aitpro)

    Have you installed BPS .50.8 with the new code that corrects this issue/problem? Can this thread be resolved? If so, please resolve this thread. If not, please add any additional info.

    Plugin Author AITpro

    (@aitpro)

    Assuming this issue/problem is resolved – thread has been resolved. If the problem is still occurring please post any additional relevant information.

    Thread Start Date: 8-25-2014 to 8-27-2014
    Current Date: 9-9-2014

Viewing 5 replies - 16 through 20 (of 20 total)
  • The topic ‘Exclude wordpress redirect block.’ is closed to new replies.