.htaccess - Stop https for a referer -
i have https website has hidden user area. there users has link links http site. referrer site makes sure userers coming site. other access attemps blocked.
since webstie change https, there referrer not working anymore.
my solution attempt far: inside htaccess want stop https 1 file on site. link is. htaccess far.
errordocument 404 /404.php rewriteengine on rewritebase / rewritecond %{http_host} ^www\.(.*)$ [nc] rewriterule ^(.*)$ http://%1/$1 [r=301,l] rewritecond %{https} off rewritecond %{request_uri} !^/mitgliederservice/infoline/index\.php$ [nc] rewriterule ^(.*)$ https://%{http_host}/$1 [r=301,l]
i don't understand whether want exclude 1 page or force 1 page https , if want exclude 1 specific page use following code :
rewriteengine on rewritecond %{https} !=on rewritecond %{request_uri} !^/path/to/yourpage\.php$ rewriterule ^ https://%{http_host}%{request_uri} [l,r] otherwise use following code :
rewriteengine on rewritecond %{https} !=on rewritecond %{request_uri} ^/path/to/yourpage\.php$ rewriterule ^ https://%{http_host}%{request_uri} [l,r]
Comments
Post a Comment