0

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"

1 Answer 1

1

Add this to your .htaccess file

RewriteCond $1 !^(index\.php|test|any_other_directory)
Sign up to request clarification or add additional context in comments.

1 Comment

ok let me try this...One additional question... is about this url "domain.com/subdir/about.php" is the same as "domain.com/subdir/about.php/"??

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.