Tôi muốn ẩn trang index.php và chỉ hiển thị tên miền..htaccess redirect index.php to/
Điều này có thể thực hiện với .htaccess không?
RewriteRule ^index\.php/?$/[L,R=301,NC]
Cũng thử:
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 vẫn cho thấy
nope. trình duyệt có thể hiển thị index.php và không chuyển hướng đến miền không? –
Bạn có thể đăng tệp .htaccess của mình không. – Satish
đăng trên wat tôi có –