remove my index.php file using .htaccess -


i trying remove trailing index.php on main site using .htaccess file , following code....

rewritecond %{the_request} ^[a-z]{3,9}\ /(([^/]+/)*)index\.(html?|php[45]?|[aj]spx?)\ https/ rewriterule index\.(html?|php[45]?|[aj]spx?)$ https://www.gekkodev.com/%1 [r=301,l] 

but of course still not working! think problem ssl certificate code has worked fine on lots of other sites

any ideas accepted! many thanks.

  • phillip

your rewritecond taking entirely wrong approach. https request http request wrapped in ssl/tls security - not contain string https in request line, checking for.

if want rule apply https requests, use %{https} variable, listed in documenation:

rewritecond %{https} on 

(i've seen lot of rewrite rules testing %{the_request} recently, , i'm not sure why, should used last resort when nothing else can work.)


Comments