• Resolved Nina15

    (@nina15)


    When saving options the .htaccess is incorrectly updated with full URL instead of using DOCUMENT_ROOT causing fatal server error as in:

    RewriteCond %{REQUEST_URI} /new-admin$
    RewriteRule ^(.*)$ /new-admin/ [R=301,L]
    RewriteRule ^https://mainsite.com/new-admin(.*) /wp-admin$1 [L,QSA]
    </IfModule>

    instead of:

    RewriteCond %{REQUEST_URI} /new-admin$
    RewriteRule ^(.*)$ /new-admin/ [R=301,L]
    RewriteRule ^new-admin(.*) /wp-admin$1 [L,QSA]
    </IfModule>

    This happens also for cache folder which effectively is not created:

    RewriteCond “%{DOCUMENT_ROOT}/https://mainsite.com/wp-content/cache/wph/%{HTTP_HOST}%{REQUEST_URI}” -f
    RewriteRule .* “/https://mainsite.com/wp-content/cache/wph/%{HTTP_HOST}%{REQUEST_URI}” [L]

    Should be:

    RewriteCond “%{DOCUMENT_ROOT}/wp-content/cache/wph/%{HTTP_HOST}%{REQUEST_URI}” -f
    RewriteRule .* “/wp-content/cache/wph/%{HTTP_HOST}%{REQUEST_URI}” [L]

    The strange thing is that everything works fine on a sub-domain of the main site when the entire wp site from mainsite.com is cloned (and scrubbed) to sub.mainsite.com (where mainsite.com and sub.mainsite.com both are installed in separate sub-directories off root where mainsite.com is the addon domain)

    Is there any explanation/fix for this?

Viewing 1 replies (of 1 total)
  • Thread Starter Nina15

    (@nina15)

    I figured it out and fixed the issue. Nothing wrong with wph. Siteurl and Home, however they are defined, must exactly match. Thanks for the great plugin in many aspects.

Viewing 1 replies (of 1 total)
  • The topic ‘.htaccess incorrectly updated with full URL’ is closed to new replies.