Welcome Guest, Not a member yet? Register   Sign In
.htaccess.. little help please
#1

[eluser]citryer[/eluser]
Dear All,

what rules should I put-in, into my .htaccess file to redirect any one visiting http://mywebsite.com/index.php/admin/login to its SSL equivalent i.e https://mywebsite.com/index.php/admin/login

Thanks and looking forward to your replies.
#2

[eluser]garaget[/eluser]
I would try this at the top of your admin/login view file
Code:
if ($_SERVER['HTTPS']!= 'on') {
// Redirect user to secure page
header("Location: https://mywebsite.com/index.php/admin/login");
exit;
}

If this is not best way to do it, then please take other suggestions. Use at your own risk Wink
#3

[eluser]citryer[/eluser]
I would prefer if this can be handled at .htaccess end. Smile
but thanks anyways..
#4

[eluser]garaget[/eluser]
Code:
RewriteEngine On
RewriteRule "^/index.php/admin/login" "https://%{HTTP_HOST}/admin/login" [R=301,L]

my htaccess skills is even worse.. same warning
#5

[eluser]citryer[/eluser]
didn't work... no redirection took place.
Just one URL to be taken care of while all the other areas of the website will be NON-SSL based. Sad




Theme © iAndrew 2016 - Forum software by © MyBB