Odd Rewrite Behavior
-
I am running a website using the latest WordPress version 4.1.1. The redirect rules are set as recommended in the multisite setup instructions as listed below. I have mixed content on this server, some subfolders have non-wordpress php scripts and html files that can be accessed without a problem. For example: https://www.ourdomain.com/directory/subdirectory/index.php
The problem is that you can add a non-existent directory to the front of that same url and it will still be displayed yet with broken links. Example: https://www.ourdomain.com/fakedirectory/directory/subdirectory/index.php
Does anyone have a solution for this?
HTACCESS Code:
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ – [L]# add a trailing slash to /wp-admin
RewriteRule ^([_0-9a-zA-Z-]+/)?wp-admin$ $1wp-admin/ [R=301,L]RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^ – [L]
RewriteRule ^([_0-9a-zA-Z-]+/)?(wp-(content|admin|includes).*) $2 [L]
RewriteRule ^([_0-9a-zA-Z-]+/)?(.*\.php)$ $2 [L]
RewriteRule . index.php [L]
- The topic ‘Odd Rewrite Behavior’ is closed to new replies.