naviciroel
naviciroel

Reputation: 412

htaccess redirecting to index issue

I got a error/issues with my .htaccess codes. The htaccess file is located in a sub-directory "domain.com/subdir/.htaccess". The thing is that when I access "domain.com/subdir/" is ok but when I try "domain.com/subdir/test/run.php" the browser wont proceed to the said url but rather stick to "domain.com/subdir". And if the file/dir does not exists its just go to the "domain.com/subdir" page and the url on the address bar still "doamin.com/subdir". Sorry for the poor english.. My Code below on my htaccess

RewriteCond %{REQUEST_URI} ^(.*)/index.php$ 
RewriteOptions Inherit
RewriteRule .* index.php [L]

Can anyone show me the right code. Aim is to proceed to any url even is a 404 or not not always sticking to the "domain.com/subdir"

Upvotes: 0

Views: 109

Answers (1)

Birdman
Birdman

Reputation: 724

Add this to your .htaccess file

RewriteCond $1 !^(index\.php|test|any_other_directory)

Upvotes: 1

Related Questions