1

I have a magento site deployed at for example www.example.com and a test site deployed at test.example.com. To resolve cookie conflict between the domain and the sub domain, I was forced to make the Session Cookie management configuration like this: enter image description here

Now I am only able to login to admin via www.example.com/admin If I write example.com and try to login, I can not login. So, I want to add 'www' to the admin url automatically if the user does not add that to the url.

How that can be achieve. Any help in this regard will be much appreciated.

asked Aug 3, 2015 at 22:48

1 Answer 1

1

You can achieve this from the .htaccess by redirecting all users to use www e.g

RewriteCond %{HTTP_HOST} ^example.com$ [NC]
RewriteRule ^(.*)$ http://www.example.com/1ドル [R=301,L]

From https://stackoverflow.com/questions/27138510/redirect-non-www-to-www-on-magento

answered Aug 4, 2015 at 0:27

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.