devknob Posted February 9, 2011 Share Posted February 9, 2011 <Directory !^/blog/$> AddHandler application/x-httpd-php .css AddHandler application/x-httpd-php .js </Directory> I cant get this to work. I just dont want these 2 rules to run within the subdirectory "blog" since its jacking up wordpress hard. I know im almost there and I found something that could have answered it last night but I cant for the life of me find it again! =\ Quote Link to comment https://forums.phpfreaks.com/topic/227197-exclude-1-directory-from-htaccess-rules/ Share on other sites More sharing options...
devknob Posted February 9, 2011 Author Share Posted February 9, 2011 tried everything <Directory /blog/> AddHandler application/x-httpd-php .css AddHandler application/x-httpd-php .js </Directory> http://httpd.apache.org/docs/2.0/sections.html it should work but it doesnt. anyone know anything? stuff Quote Link to comment https://forums.phpfreaks.com/topic/227197-exclude-1-directory-from-htaccess-rules/#findComment-1172023 Share on other sites More sharing options...
devknob Posted February 9, 2011 Author Share Posted February 9, 2011 something else should be preventing it from working right? everything else works. RewriteEngine On Options +FollowSymLinks Options All -Indexes AddType application/x-httpd-php .php .xml RewriteBase / RewriteCond %{REQUEST_URI} !^/blog RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_URI} !\.+$ RewriteCond %{REQUEST_URI} !/$ RewriteRule ^(.*) http://thishorridsite.com/$1/ [R=301,L] RewriteCond %{REQUEST_FILENAME} !-f RewriteRule (.+)\.html?$ http://thishorridsite.com/ [R=301] RewriteRule ^engines/(.*)$ engines.php?query=$1 [L] RewriteRule ^lamits/(.*)$ lambodoorkits.php?query=$1 [L] RewriteRule ^radctors/(.*)$ beltronics.php?query=$1 [L] RewriteRule ^whels/(.*)$ wheels.php?query=$1 [L] RewriteRule ^whed/(.*)$ wheels-by-brand.php?query=$1 [L] RewriteRule ^(.*)/$ a3.php?query=$1 [L] ErrorDocument 400 /400.php ErrorDocument 401 /401.php ErrorDocument 403 /403.php ErrorDocument 404 /404.php ErrorDocument 500 /500.php # secure htaccess file <Files .htaccess> order allow,deny deny from all </Files> # deny access to evil robots site rippers RewriteCond %{HTTP_USER_AGENT} ^Anarchie [OR] RewriteCond %{HTTP_USER_AGENT} ^ASPSeek [OR] RewriteCond %{HTTP_USER_AGENT} ^attach [OR] RewriteCond %{HTTP_USER_AGENT} ^autoemailspider [OR] RewriteCond %{HTTP_USER_AGENT} ^Xaldon\ WebSpider [OR] RewriteCond %{HTTP_USER_AGENT} ^Xenu [OR] RewriteCond %{HTTP_USER_AGENT} ^Zeus.*Webster [OR] RewriteCond %{HTTP_USER_AGENT} ^Zeus RewriteRule ^.* - [F,L] #cache <ifModule mod_headers.c> Header unset ETag </ifModule> FileETag None ExpiresActive On ExpiresDefault "access plus 30 days" ExpiresByType image/gif "access plus 30 days" ExpiresByType image/png "access plus 30 days" ExpiresByType image/jpg "access plus 30 days" ExpiresByType text/css "access plus 30 days" ExpiresByType text/php "access plus 30 days" #does fuck all , 500 internal service error <Directory "/blog/"> AddHandler application/x-httpd-php .css AddHandler application/x-httpd-php .js </Directory> php_flag zlib.output_compression On Quote Link to comment https://forums.phpfreaks.com/topic/227197-exclude-1-directory-from-htaccess-rules/#findComment-1172027 Share on other sites More sharing options...
devknob Posted February 9, 2011 Author Share Posted February 9, 2011 i tried Location and DirectoryMatch too. Quote Link to comment https://forums.phpfreaks.com/topic/227197-exclude-1-directory-from-htaccess-rules/#findComment-1172032 Share on other sites More sharing options...
devknob Posted February 9, 2011 Author Share Posted February 9, 2011 i got it working the dumb patchy way RewriteEngine On Options +FollowSymLinks Options All -Indexes RewriteBase /blog/ AddHandler text/css .css AddHandler application/x-javascript .js i put this in /blog/ still waiting for the right way using <directory> tho Quote Link to comment https://forums.phpfreaks.com/topic/227197-exclude-1-directory-from-htaccess-rules/#findComment-1172088 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.