Problem with htaccess - How to make it affect firt directory only

Spacemail by SpaceshipSpacemail by Spaceship
Watch

Jawn

Straight from SwedenEstablished Member
Impact
2
Hi,
I have a htaccess file under home/user/public_html/.htaccess
But it affects all my other websites aswell they are in

home/user/public_html/my main website
home/user/public_html/website1/
home/user/public_html/website2/


Problem is that it affects my other webpages website 1 and website 2
Is there a way to avoid this? its giving me a lot of problems.

This is how it currently looks


Code:
RewriteEngine On
RewriteCond %{REQUEST_URI} !.*images.* [NC]
RewriteCond %{REQUEST_URI} !.*.js.* [NC]
RewriteCond %{REQUEST_URI} !.*forum.* [NC]
RewriteCond %{REQUEST_URI} !.*admin.* [NC]
RewriteCond %{REQUEST_URI} !.*.gif.* [NC]
RewriteCond %{REQUEST_URI} !.*.bmp.* [NC]
RewriteCond %{REQUEST_URI} !.*.%.* [NC]
RewriteCond %{REQUEST_URI} !.*.jpg.* [NC]
RewriteCond %{REQUEST_URI} !.*.htm.* [NC]
RewriteCond %{REQUEST_URI} !.*.css.* [NC]
RewriteCond %{REQUEST_URI} !.*.swf.* [NC]
RewriteCond %{REQUEST_URI} !.*.php.* [NC]
RewriteCond %{REQUEST_URI} !.*.txt.* [NC]
RewriteCond %{REQUEST_URI} !.*.png.* [NC]
RewriteCond %{REQUEST_URI} !.*.dcr.* [NC]
RewriteCond %{REQUEST_URI} !.*.dir.* [NC]
RewriteCond %{REQUEST_URI} !.*.rar.* [NC]
RewriteCond %{REQUEST_URI} !.*.zip.* [NC]
RewriteCond %{REQUEST_URI} !.*.pl.* [NC]
RewriteCond %{REQUEST_URI} !.*.tmpl.* [NC]
RewriteCond %{REQUEST_URI} !.*.pm.* [NC]
RewriteCond %{REQUEST_URI} !.*/$ [NC]
RewriteRule ^.*$ index.php [L]


Would appreciate if someone could help me

Best Regards
Jawn
 
0
•••
The views expressed on this page by users and staff are their own, not those of NamePros.
Unstoppable Domains — AI StorefrontUnstoppable Domains — AI Storefront
Why don't you just move the file into the directory you want it to affect?
 
0
•••
Here's a cheap solution
dump an htaccess in every child directory and use
RewriteEngine Off (I think this is the answer, i'll look further)
 
0
•••
TwistMyArm said:
Why don't you just move the file into the directory you want it to affect?


It is in a directory where i need it
My main website is under home/user/public_html/
but my other websites are under

home/user/public_html/website2/
home/user/public_html/website3/

I cant shut off rewriteengine in each website directory cuz i use htaccess
on the other websites :/ however they do have their own htaccess
 
0
•••
Appraise.net

We're social

Spaceship
Domain Recover
CatchDoms
DomainEasy — Live Options
  • The sidebar remains visible by scrolling at a speed relative to the page’s height.
Back