Welcome Guest, Not a member yet? Register   Sign In
Check my .htaccess code please
#1
Sad 

My goal is to add the www and enable HTTPS in all URLs, does this setup look fine?

Code:
RewriteCond %{HTTPS} off
# First rewrite to HTTPS:
# Don't put www. here. If it is already there it will be included, if not
# the subsequent rule will catch it.
RewriteRule .* https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
# Now, rewrite any request to the wrong domain to use www.
RewriteCond %{HTTP_HOST} !^www\.
RewriteRule .* https://www.%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

#Checks to see if the user is attempting to access a valid file,
#such as an image or css document, if this isn't true it sends the
#request to index.php
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond $1 !^(index\.php|public|images|robots\.txt|css)
RewriteRule ^(.*)$ index.php/$1 [L]
Reply


Messages In This Thread
Check my .htaccess code please - by flaboi - 04-30-2016, 08:18 PM
RE: Check my .htaccess code please - by skunkbad - 04-30-2016, 11:02 PM
RE: Check my .htaccess code please - by InsiteFX - 05-01-2016, 03:58 AM
RE: Check my .htaccess code please - by flaboi - 05-01-2016, 09:44 AM
RE: Check my .htaccess code please - by InsiteFX - 05-01-2016, 11:52 AM
RE: Check my .htaccess code please - by nkhan - 05-01-2016, 12:06 PM
RE: Check my .htaccess code please - by flaboi - 09-08-2016, 08:00 PM
RE: Check my .htaccess code please - by InsiteFX - 09-09-2016, 04:59 AM
RE: Check my .htaccess code please - by flaboi - 09-09-2016, 09:14 AM
RE: Check my .htaccess code please - by InsiteFX - 09-09-2016, 12:08 PM
RE: Check my .htaccess code please - by flaboi - 09-11-2016, 07:42 AM
RE: Check my .htaccess code please - by flaboi - 09-29-2016, 11:08 PM



Theme © iAndrew 2016 - Forum software by © MyBB