Answer the question
In order to leave comments, you need to log in
How to make a beautiful CNC url?
Some difficulties arose ...
I have a directory /reg/index.php
Tried to access it at site.com/reg
Made a .htaccess file, one of the examples that I added there
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_HOST} (.*)
RewriteCond %{REQUEST_URI} /$ [NC]
RewriteRule ^(.*)(/)$ $1 [L,R=301]
</IfModule>
Answer the question
In order to leave comments, you need to log in
DirectoryIndex index.php index.html index.htm
RewriteCond %{REQUEST_URI} ^(.*)/index\.php$
# URL cодержит index.php в конце.
RewriteCond %{REQUEST_METHOD} =GET
# Выявляем GET запрос в URL (не POST).
RewriteRule ^(.*)$ %1/ [R=301,L]
# Удалить index.php из URL.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question