Opencart Login Issues - opencart2.x

I am unable to login to the Opencart Dashboard. I can see the login screen and enter passwords. I even did a fresh install. It just doesn't redirect me to the dashboard. I have read up and tried every possible solution. Is there something on the server that could be blocking the re-direct.

This could be caused by .htaccess redirect. It happened to me too because my website was getting redirected to www.example.com but the session was for example.com. Make sure you have the same version of the url everywhere.

Related

Image URL being redirected to other web site

I am trying to use an image from an existing website in my html page. The issue is that the image is not getting resolved correctly, Even when I hit the image URL directly on browser, its getting redirected to some other site. I have tried on all browsers but no luck.
I have heard about restricting resource using hot linking but in this case not sure whats happening. Any pointers/suggestions please.
Eg - I want to use image(http://www.acsisair.com.au/wp-content/themes/acsis-air/images/logo.png) but when hitting this URL after clearing browser cache, its being redirected to other website (http://www.nine.com.au)
It's very, very likely a form of hotlinking protection: if you change the URL subtly to make it clearly incorrect, you get a 404 page.
That means when you enter an URL to a resource that exists, you're given a header redirect. That's not an accident.
There's likely nothing you can (or should) do to circumvent this.
Use images you can host on your own site.

IIS forms authentication cross domain not redirecting to correct domain

I have 2 sites running on one instance of IIS 7.
A.site.com
B.site.com
These sites use forms authentication and there is one form for logging in on site A.
So if i try to access a restricted page on site B with URL
B.site.com/TEST/
i get redirected to
A.site.com/login.aspx?ReturnUrl=%2TEST%2f
I can then enter username and password to authenticate. So far so good.
After authentication I get redirected to
A.site.com/TEST/
instead of
B.site.com/TEST/.
Can anyone tell me how i can get around this problem and make IIS redirect me to the correct page?
Note: the authentication works fine - i can go to the page B.site.com/TEST/ and i am no longer redirected to the login page. So the problem is just redirecting to the wrong site or the value of ReturnUrl should not be a relative path.
A workaround might be to force the user to go back to the last page using JS instead. Not a great answer though i admit. I think this is an IIS bug since the documentation to set up forms authentication with different sub-domains does not mention this problem at all.
EDIT:
A better answer is change the loginUrl to include the domain.
loginUrl="https://A.site.com/Login.aspx?domain=B.site.com"
Then handle the redirect client side

new to .htaccess, how to redirect specific page to mainpage

I'm new to .htaccess file.
My site is hosted on 1and1 and by default it shows www.mydomain.com/defaultsite when nothing is uploaded to my account. Now I've uploaded my wp site and have managed to make it go to index, but if someone inputs in the url www.domain.com/defaultsite he will still get the wrong place.
How can I manage this issue with .htaccess file so that any request to defaultsite will take the user to www.mydomain.com ?
I'm not a 1and1 user, but this could be a DNS cache issue. First, check your document root for the presence of a directory called defaultsite. If it exists, remove it. If not, then you can attempt removing it using mod_rewrite. Insert this rule immediately after RewriteEngine On in your .htaccess file:
RewriteRule ^defaultsite/?$ http://yourdomain.com/ [R=302,L]
If it's working for you, you can safely change 302 to 301 to make in permanent and cache-able.
I have also seen comments referring to an index.html file in the document root. If you see one, delete it - it could be that, internally, 1and1 maps defaultsite to index.html.
Also, it will help for you to clear the cache in your browser when testing. If using Chrome, you can open the Developer Tools (Ctrl+Shift+I), click on the settings cog at the top right of the panel that opens, and check 'Disable cache (while DevTools is open)`.
I had a similar issue and was pulling out my hair trying to figure this out. 1&1 is hosting while Namecheap holds my domain. I was able to access my page without /defaultsite on Safari and mobile Chrome. But on desktop Chrome I was being redirected to /defaultsite.
To remedy this I cleared my cache, flushed my DNS cache, and cleared my browsing history. Not sure if the latter 2 were necessary but having done all three it did help resolve this issue.

HTTPS on OpenCart - How to disable HTTPS on /admin?

Got a website that need to use HTTPS in the frontend, but the HTTPS is causing issues on OpenCart /admin login page. Seems like all styles are disabled when accessing the /admin section through HTTPS. Client wants everyone to access the site through HTTPS, so we have a 301 redirect to the HTTPS version of the site, but this is causing issues with /admin.
Any suggestions?
If your certificate is valid, this shouldn't be an issue in the /admin
My guess is your cert is for yoursite.com and your admin is forcing www to www.yoursite.com (possibly the other way around). Ensure you have the correct URL in your /admin/config.php for the certificate, particularly the HTTPS_SERVER value defined in there. If that doesn't fix it, you'll need to provide a link
Go to admin folder. First Backup config.php Then edit config.php . Make http:// url to https:// .Then save . Now visit admin page , https works without no issue .

I want to use https in opencart checkout page only, the rest page should have http

I have installed ssl certificate and I want to use https in checkout page only. I have set on the ssl in settings. It's still showing https in all the page.
Please tell me the solution for this.
Thank you!
Opencart by default works with ssl only in checkout pages and when user is logged in, as such the only way for you to have https in all url is to force via .htaccess, the simplest solution if this is the case is to remove the redirection that forces https in .htaccess enable ssl in opencart backend and change the config file site url from http to https, although these are steps you should have taken before, and a simple removal of the right lines in .htaccess should suffice.

Resources