1
當我去如何從WWW到非www的.htaccess刪除index.php文件重定向
www.example.co/courses
我重定向到
https://example.co/index.php/courses
我想重定向到
https://example.co/courses
我試過的東西
這是我.htaccess
文件的時刻:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L]
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
RewriteCond %{HTTP_HOST} ^www\.example\.co [NC]
RewriteRule ^(.*)$ https://example.co/$1 [L,R=301]
</IfModule>
如何刪除重定向的URL的一部分/index.php/
?
哇,這確實很有道理。謝謝你教我新東西! –