0

I know this question is more about apache config, but it involves Magento too. Currently i have configured my Magento with 2 different URLs,

for port 443 or https I have an url like this: https://subdomain.domain.org/

for http i have: http://subdomain.domain.org/folder

I want to redirect whenever a user types subdomain.domain.org to https://subdomain.domain.org, but if i do this my admin panel redirects there too, i have tried RewriteCond but no one of them worked, my admin panel url is: http://subdomain.domain.org/folder/admin , this link should not be redirected.

Can someone help me to figure out how to do this?

Thank you!

1 Answer 1

1

Please check with below posibilities :

check with your .htaccess ( url rewrite )

check your admin base url.

i.e htaccess :

Options +FollowSymLinks  #Include this line if you are using Godaddy hosting
RewriteEngine On
RewriteCond %{REQUEST_URI} !(.*)subfolder
RewriteRule ^(.*)$ subfolder/$1 [L]

another option :

goto database core_cofig table

path - admin/url/use_custom set value 0

path - admin/url/use_custom_path set value 0

I hope its very helpful to you

4
  • Hello, I don't know what i'm doing wrong but this does not work, I put the rule at the end of mod_rewrite. Jul 30, 2019 at 13:27
  • please check my answer, i updated, one more possibility.., than please flush cache. Jul 30, 2019 at 13:38
  • its working for my side. Jul 30, 2019 at 13:45
  • Hello, at the end I used this rule and it worked: RedirectMatch permanent "^(/(?!folder/?).*)" subdomain.domain.org/$1 ,I really appreciate your help. Jul 30, 2019 at 14:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.