Daniel Israel
09-23-2009, 08:22 PM
Had an .htaccess question for dealing with wordpress. Wordpress has an .htaccess file to deal with the permalinks. Works great.
Problem is that Wordpress is on the root of the site and there is a subdomain that I don't want to use the wordpress rewrites.
So I added something to the wordpress .htaccess to deal with it. It looks something like this:
# BEGIN WordPress
<ifmodule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_HOST} !^subdomain.domain.com
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</ifmodule>
# END WordPress
works dandy. Problem is that wordpress will rewrite the .htaccess file to it's own stuff periodically, leaving me out in the blue.
The Wordpress doc says to avoid rewrite by not editing between the # BEGIN WORDPRESS and # END WordPress comments.
I'm not so good with this .htaccess config stuff, so I need some help... Is there some way to only use this code if I'm not in the subdomain?
Any help is appreciated. Thanks!
Problem is that Wordpress is on the root of the site and there is a subdomain that I don't want to use the wordpress rewrites.
So I added something to the wordpress .htaccess to deal with it. It looks something like this:
# BEGIN WordPress
<ifmodule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_HOST} !^subdomain.domain.com
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</ifmodule>
# END WordPress
works dandy. Problem is that wordpress will rewrite the .htaccess file to it's own stuff periodically, leaving me out in the blue.
The Wordpress doc says to avoid rewrite by not editing between the # BEGIN WORDPRESS and # END WordPress comments.
I'm not so good with this .htaccess config stuff, so I need some help... Is there some way to only use this code if I'm not in the subdomain?
Any help is appreciated. Thanks!