.htaccess rewrite / to index.html, all other to index.php -


i want use .htaccess rewrite url webite:

if url http://mydomain.com or http://mydomain.com/ index.html serve request, other urls go index.php

please help!

quite simple, in 2 rules. 1 rule root (^$, matches empty string after leading request_uri slash), , rest other routes ((.+), matches 1 or more characters):

rewriterule ^$ index.html [l] rewriterule (.+) index.php [l] 

note: leading slash not appear in source pattern. why first rule checks empty string.


Comments

Popular posts from this blog

SPSS keyboard combination alters encoding -

Add new record to the table by click on the button in Microsoft Access -

CSS3 Transition to highlight new elements created in JQuery -