.htaccess redirect to both index.html and .php
Currently I have a landing page html witch the domain points to but if I access /index.php it redirects back to index.html.
How could I make the index.php accessible?
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_URI} ^$
Rew开发者_如何学CriteCond %{HTTP_HOST} ^domain.co.nz$
RewriteRule ^$ http://domain.co.nz/index.html [L,R=301]
You are redireting everything to the html file.
Try:
# Enable rewiting
RewriteEngine on
Options +FollowSymLinks
# set 'default' file
DirectoryIndex index.html
# everything else goes to the index.php file, except your sites assets/
RewriteCond $1 !^(index\.php|index\.html|images|css|javascript)
RewriteRule ^(.*)$ /index.php/$1
精彩评论