Answer the question
In order to leave comments, you need to log in
How to optimize .htaccess for page redirect?
When I open certain pages on the site, I need to open them but load a certain script.
Here is an example of two pages
:
https://site.ru/9.2040392295441-matic-usd/
and
https://site.ru/matic-2021-08-01/
usd/ the page https://site.ru/matic-2021-08-01/ was opened by loading dashboard.php
and when the page https://site.ru/9.2040392295441-matic-usd/ was opened, dashbord2.php was loaded
keeping the original url addresses in the browser
I did this:
RewriteRule ^([az]+)-([0-9]+)-([0-9]+)-([0-9]+)/?$ dashboard.php?id=$1 [L]
RewriteRule ^ ([.0-9]+)-([az]+)-([az]+)/?$ dashboard2.php?id=$1 [L]
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question