Quantcast
Channel: Active questions tagged https - Stack Overflow
Viewing all articles
Browse latest Browse all 1542

cakephp and https redirects

$
0
0

I have a site that has some strict requirements for SEO purposes.

The main one is redirecting all http requests to https which I have done by adding this into the AppController:

public function forceSSL() {    return $this->redirect('https://' . env('SERVER_NAME') . $this->here);}public function beforeFilter() {    $this->Security->blackHoleCallback = 'forceSSL';    $this->Security->requireSecure();}

The issue I have is with 404 pages, they do not redirect to https (eg. www.hublink.net/asdfg)

I have also added these 2 lines to the .htaccess file (from another post), and removed the above code but then get a "redirect loop" error

RewriteCond %{HTTPS} !=on [NC]RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [R,L]

Viewing all articles
Browse latest Browse all 1542

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>