Answer the question
In order to leave comments, you need to log in
How to shorten links in htaccess?
Good afternoon!
There are links like:
http://site.ru/main/{folder that can change}/folder/{file names of which are many}.php
How to do it:
http://site.ru/{file names of which are many}.php
or
http://site.ru/pages/{there are a lot of file names}.php
Tried a lot of options already.... so far nothing has helped((
--------
UPD
Finally got to do what would be the name file changed, but how to make the folder change - I can’t catch up (
RewriteRule ^([a-zA-Z0-9_-]+).php$ design/FOLDER/html/$1.php [L]
Answer the question
In order to leave comments, you need to log in
What have you tried?
Something like this:
RedirectMatch ^/main/.*/folder/(.*\.php)$ www.site.ru/pages/$1
?
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question