Greenguy's Board


Go Back   Greenguy's Board > Programming & Scripting
Register FAQ Calendar Today's Posts

Reply
 
Thread Tools Search this Thread Rate Thread Display Modes
Old 2009-08-13, 03:28 PM   #1
JK
Well you know boys, a nuclear reactor is a lot like women. You just have to read the manual and press the right button
 
Join Date: Nov 2003
Posts: 157
Preventing the WordPress .htaccess file rewriting requests from a specific sub-dir

Say I have WP installed at the root of a domain and I have free sites in the /sites/ sub-dir. I don't want /sites/oops.html to be parsed by the RewriteRule at the root of the domain.

I thought adding this would do the trick:

Code:
RewriteCond %{REQUEST_URI} !^/sites/.*$
which would make the entire .htaccess file at the root of the domain:

Code:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_URI} !^/sites/.*$
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
This doesn't seem to work.

I have also tried adding a blank .htaccess file to /sites/ (and /sites/free-site/) and adding RewriteEngine Off to these files. These don't work either.

Is what I want to achieve possible?
__________________
To alcohol! The cause of, and solution to, all of life’s problems
JK is offline   Reply With Quote
Old 2009-08-13, 03:40 PM   #2
cd34
a.k.a. Sparky
 
cd34's Avatar
 
Join Date: Sep 2004
Location: West Palm Beach, FL, USA
Posts: 2,396
In the subdirectory, in the .htaccess

RewriteEngine off

will turn it off.

If it isn't, then something is wrong with the apache config. It is possible that mod_rewrite is turned off for certain directories, but, that would again be a server config issue. Some hosting companies running on networked storage do have a slight lag for the webserver to pick up that there has been a change to the files in directories, so, it is also possible that the .htaccess with RewriteEngine off hadn't been noticed by apache or the webserver software your server uses.
__________________
SnapReplay.com a different way to share photos - iPhone & Android
cd34 is offline   Reply With Quote
Old 2009-08-13, 04:09 PM   #3
JK
Well you know boys, a nuclear reactor is a lot like women. You just have to read the manual and press the right button
 
Join Date: Nov 2003
Posts: 157
Thanks cd34, I thought it should have worked.

I'll get in touch with my host to see if there's a funky configuration.

__________________
To alcohol! The cause of, and solution to, all of life’s problems
JK is offline   Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 05:39 AM.


Mark Read
Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
© Greenguy Marketing Inc