6
我想隱藏index.php頁面並只顯示域。.htaccess將index.php重定向到/
這是可能的.htaccess?
RewriteRule ^index\.php/?$/[L,R=301,NC]
也試過:
RewriteEngine On
RewriteBase/
RewriteCond %{THE_REQUEST} ^[A-Z]{3,9} /index.php HTTP/
RewriteRule ^index.php$ http://example.com/ [R=301,L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
index.php文件還顯示
都能跟得上。瀏覽器是否總能顯示index.php,而不是隻重定向到域? –
你能發佈你的.htaccess文件嗎? – Satish
張貼上面笏我有 –