Answer the question
In order to leave comments, you need to log in
How to implement rules for urls with slashes in htaccess?
Essence of the question: I have a site http://site.com that looks at the index.php root file.
I need any url like:
site.com/url1
site.com/someurl
site.com/blablabla
...
look to index.php, provided that there is no folder with the same name in the root. And if there is such a folder, then accordingly, so that this rule does not work.
Is it possible to somehow write this as a RewriteRule directive in .htaccess or something else?
Answer the question
In order to leave comments, you need to log in
Can. The essence is this:
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . index.php
I tried, I registered the following in .htaccess:
AddDefaultCharset windows-1251
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . index.php
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question