forced Https RewriteRule .htaccess gives 403 error

Nick Leeman

I have a problem with my .htaccess file for my site. I want to force people to use https for my site so I have added this to my already existing .htaccess:

RewriteEngine On
RewriteCond %{HTTPS} !on
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}

End result:

RewriteEngine On
RewriteCond %{HTTPS} !on
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}


RewriteEngine On

RewriteRule ^([a-zA-Z0-9_-]+)(|/)$ index.php?url=$1
RewriteRule ^news/([a-zA-Z0-9_-]+)(|/)$ index.php?url=news&id=$1
RewriteRule ^home/([a-zA-Z0-9_-]+)(|/)$ index.php?url=home&user=$1
RewriteRule ^swf/plex-imaging/badge/([a-zA-Z0-9_-]+)(|/)$ swf/plex-
imaging/badge.php?badge=$1
RewriteRule ^register/([a-zA-Z0-9_-]+)(|/)$ index.php?
url=register&userref=$1
RewriteRule ^newpassword/([a-zA-Z0-9_-]+)(|/)$ index.php?
url=newpassword&key=$1

But now I get a 403 error:

You don't have permission to access / on this server.

Nick Leeman

I fixed it by reloading my ssl certificate!

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

htaccess RewriteCond and RewriteRule for not HTTPS

From Dev

RewriteRule gives HTTP 500 error

From Dev

Error 404 using RewriteRule in .htaccess

From Dev

htaccess RewriteRule 500 error - loop

From Dev

.htaccess rewriterule 500 internal error

From Dev

403 Error in .htaccess

From Dev

Unable to solve .htaccess url rewriterule, gives 404 for all pages

From Dev

.htaccess RewriteRule 500 Internal Server Error

From Dev

htaccess RewriteRule not working - (404 error) from server

From Dev

.htaccess rewriterule empty parameters note found error

From Dev

Apache 403 Error with HTTP not with HTTPS

From Dev

htaccess RewriteRule to https doesn't work combined with other rules

From Dev

RewriteRule for htaccess

From Dev

Fix a domain error: Forced the HTTPS but placed a wrong domain now it is not changing

From Dev

HTTP 500 error on forced HTTPS redirects with external logins

From Dev

Using HttpURLConnection in Android gives 403 Error

From Dev

Volley ImageLoader gives 403 response for some https url

From Dev

.Htaccess RewriteRule redirects all pages to 404 page not found error

From Dev

HttpWebRequest for HTTPS got 403 Forbidden Error

From Dev

Visual basic https web request 403 error

From Dev

.htaccess file gives 500 internal server error

From Dev

WAMP .htaccess gives Internal Server Error

From Dev

.htaccess redirect my site gives internal error

From Dev

Htaccess RewriteRule long URL

From Dev

RewriteRule relative to subdirectory the htaccess is in

From Dev

RewriteRule htaccess if a file exists

From Dev

.htaccess RewriteRule with slash in url

From Dev

Simple .htaccess RewriteRule not working

From Java

.htaccess RewriteRule not working

Related Related

HotTag

Archive