https://site.ru/index.php/news-3750
RewriteEngine On
RewriteBase /
RewriteRule ^news-([^/]*)$ index.php?do=news&po=$1 [QSA]
我不明白如何解决它,强制类似的网址
https://site.ru/index.php/news-3750
重定向到
https://site.ru/news-3750
网上好像有所有可能的选项,我都试过了,没有一个有帮助......
# Удаление index.php c конца
RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /index\.php\ HTTP/ [NC,OR]
# С wwww на без
RewriteCond %{HTTP_HOST} ^www\..+ [NC,OR]
# Удал.повтр //
RewriteCond %{THE_REQUEST} // [NC,OR]
# С http на https
RewriteCond %{HTTP:X-Forwarded-Proto} =http
RewriteRule ^(.*) https://site.ru/$1 [R=301,L]