M
M
medicalcomp2016-01-20 11:12:24
htaccess
medicalcomp, 2016-01-20 11:12:24

Why doesn't rewrite work in htaccess when there is an existing directory?

Hello. Tell me please. There was a problem. If the directory exists, then the redirect in the .htaccess file is not performed
. eg
RewriteRule ^news/$ news.php [L]
is not executed if there is a news folder, there is no folder, no problem.
Maybe somewhere in the apache settings the problem.
Help me decide please.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
R
Roman Volkov, 2016-01-20
@greymag

Check if something like
RewriteCond %{REQUEST_FILENAME} -d is above
And if another RewriteRule c [L] doesn't fire before

M
medicalcomp, 2016-01-20
@medicalcomp

I only have
RewriteRule ^news/$ news.php [L]
The rule doesn't work if the directory exists. In the logs, it goes to the actual location of the folder. Doesn't work like for example with MultiViews, those. the rule set by MultiViews is executed, and the mod_rewrite rules are ignored.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question