G
G
goldfox_ru2021-01-26 08:37:17
PHP
goldfox_ru, 2021-01-26 08:37:17

How to leave static pages using CNC?

Hello, I connected the CNC of the form

RewriteEngine On
RewriteRule ^(.*)/(.*)$ test.php?test=$1 [L]

Everything works great here, just the way I want it. But another problem arose, if I have a folder in the root of the site and files like pages/admin.php in it, then I can’t open them, it just redirects me to the main page of the site. What can be done in this case?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
J
John Didact, 2021-01-26
@JohnDidact

Answering the question specifically:

RewriteEngine On
RewriteCond "%{DOCUMENT_ROOT}%{REQUEST_URI}" !-d
RewriteCond "%{DOCUMENT_ROOT}%{REQUEST_URI}" !-f
RewriteRule ^(.*)/(.*)$ test.php?test=$1 [L]

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question