Another https redirection
-
Akuna
-
Topic Author
-
Offline
-
New Member
-
Less
More
-
Posts: 8
-
Thank you received: 0
-
-
10 years 1 month ago - 10 years 1 month ago #3107
by Akuna
My website used https protocol with no www. on all of its pages.
Then recently for a number of reason, I decided to switch to http://www. and only use https protocol for the admin login.
In .htaccess I added the following rule:
RewriteCond %{HTTPS} off
RewriteCond %{HTTP_HOST} !^www\.
RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L]
and in ReDJ I added this rule:
From ^https://
To http://{host}{path}{queryfull}
Skip /administrator/?
Case sensitive unchecked
Request Only unchecked
Decode URL checked
The reason I use Redj to redirect https skipping /administrator, is that if I try to accomplish the same thing in .htaccess (with: RewriteCond %{REQUEST_URI} !^/administrator/ instead of: RewriteCond %{HTTPS} off) then I loose all icons in joomla administrator panel.
And if I do not skip /administrator, https login to the admin page fails (keeps spinning on a blank page) since www gets inserted in the url.
With these settings, all indexed links in Google seem to work well, whether non-www https links, non-www http links or www http links.
However, when I log in my admin page, I have to refresh the page to be able to get in the admin panel, otherwise the wheel keep spinning on the login box forever. Other pages inside the admin also do not refresh by themselves, such as the clearing the cache or other odd pages.
Another thing is that the website preview link doesn't work (keeps spinning on a blank page) from the admin panel since its URL automatically starts with https://www
Are there any better ways to tune these settings ?
Basically all admin related pages should stay on https:// with no www in the scheme, like it was originally.
While all other pages should be redirected to http://www
Last edit: 10 years 1 month ago by Akuna.
Please Log in or Create an account to join the conversation.
Less
More
-
Posts: 3194
-
Thank you received: 441
-
-
10 years 1 month ago #3112
by admin
Ok,
first try to leave the .htaccess option, to disable the ReDJ rule, and enable "Force SSL" for "Administrato only" in the Joomla Global Configuration. If this not works as expected, enable the rule and send me an email to info(at)selfget.com so I can test the problem by myself.
Kind regards,
Luigi
Please Log in or Create an account to join the conversation.
-
Akuna
-
Topic Author
-
Offline
-
New Member
-
Less
More
-
Posts: 8
-
Thank you received: 0
-
-
10 years 1 month ago - 10 years 1 month ago #3115
by Akuna
Hi Luigi,
Enforce SSL for administrator only is already activated in Joomla (I did that when I switched from using ssl for the whole site to using it only for the admin page)
If I do not use ReDJ rule, then all links under the form 'https:// + mywebsite.com' lead to blank spinning page, some with a 404 title.
With these two rules activated together (.htaccess + ReDJ), everything works pretty much as expected, except links under the form of 'https:// +
www.mywebsite.com' plus some odd refreshing anomalities in Joomla admin which I mentionned above (another exemple in ReDJ redirect page: cliking on a 'case sensitive' icon from the main list of rules lead to the wheel spinning forever and the page not refreshing automatically, while clicking on the 'activating/deactivating' icon from the main list of rules work as expected).
I'm sending you a mail. Thanks!
Last edit: 10 years 1 month ago by Akuna.
Please Log in or Create an account to join the conversation.
Less
More
-
Posts: 3194
-
Thank you received: 441
-
-
10 years 1 month ago #3117
by admin
Ok,
probably I will need to call these URLs to trace requests on my browser. We will follow up in the email.
Kind regards,
Luigi
The following user(s) said Thank You: Akuna
Please Log in or Create an account to join the conversation.
-
Akuna
-
Topic Author
-
Offline
-
New Member
-
Less
More
-
Posts: 8
-
Thank you received: 0
-
-
10 years 1 month ago #3126
by Akuna
Luigi, thank you so much for all your help with this.
I contacted my host provider and they found that these problems were caused because I had set the Live Site variable of Joomla to:
http://www.mydomain.com
Yet the backend was set to being accessed securely and as such it tried to redirect to my site securely, and with the live site variable set to www. there was a redirect loop.
With the live site option disabled,both backend and frontend are correctly accessible and I didn't notice further problem.
Really sorry for troubling you unecessarily.
Please Log in or Create an account to join the conversation.
Less
More
-
Posts: 3194
-
Thank you received: 441
-
-
10 years 1 month ago #3129
by admin
Don't worry,
I am glad the problem is now solved and happy that you share solution with us...
Kind regards,
Luigi
The following user(s) said Thank You: Akuna
Please Log in or Create an account to join the conversation.
Time to create page: 0.194 seconds