pjc
pjc

Reputation: 127

.htaccess, WordPress and mod_speling

I've got a server that has in its root directory a bunch of subdirectories, one of which has a WordPress.

directory1
directory2
wordpress
directory3

All of these except for the WordPress were migrated from a Windows server to a Linux server which means that we've lost case insensitivity.

I want the WordPress to be able to serve a URL like http://www.example.com/~subdomain, so there's an index file in the root directory. I also have two .htaccess files, one in the WordPress and one in the root directory.

The following is the root directory's .htaccess. This is where I'd like to put mod_speling's case insensitivity directives, but it conflicts with the rewrite rule.

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

# END WordPress

Below is the WordPress subdirectory's .htaccess

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

# END WordPress

I've tried using a symlink in the root directory to point to the WordPress directory's index.php. I set the symlink to be the DirectoryIndex but unfortunately it results in a lot of the links turning into 404s.

At this point I'm kind of stuck. Any ideas?

Upvotes: 0

Views: 568

Answers (0)

Related Questions