htaccess multiple rewrite - TechRepublic
Question
February 10, 2010 at 02:21 PM
kurt.foster

htaccess multiple rewrite

by kurt.foster . Updated 16 years, 5 months ago

I would like to use my htaccess to file to both remove the index.php from the url and redirect all users to SSL, is this possible and how can i do it, i have tried the code below but it isn’t working.

RewriteEngine On
RewriteCond %{SERVER_PORT}!443
RewriteRule ^(.*)$ https://mysite.com.au/web/directory [R]
RewriteCond $1 !^(index\.php|robots\.txt|sitemap\.xml|favicon\.ico)
RewriteRule ^(.*)$ index.php/$1 [L]

This discussion is locked

All Comments