aaPanel_Jose
then how do i redirect from www.domain.com to domain.com
WWW Canonicalization
JAY you can use php redirect to do it in a file or a directory or even .htaccess
TheWormsUnited
i know how to do in htacess iam trying to fix the feature which is there in site already
JAY the way i do it its when i create the domain name in aaPanel, i simply add the www.domain.com on it as well on the time of the creation, then i dont need to do anything else, I also use the DNS manager, and my registar has the www added on the cname as well. This is my method, works perfectly on www or without it. Hope that helps you.
- Edited
TheWormsUnited
i really i dont know how to explain you are such a non understandable user iam able to access my domain on www.domain.com and domain.com
i just need to redirect the domain from www.domain.com to domain.com as i dont want to usrs to access domain from www.domain.com
JAY you are such a non understandable user
Completely unnecessary, further more when you are the one that does not explain correcctly and myself just want to help you out. No worries, me and myself keep out of your understandable posts.
JAY
redirect from www.domain.com to domain.com should be no problem. can i login your panel or use remote tools to check it for you?
any update to this fix
JAY
I have no way to reproduce this problem. I checked and judged that the two domain names are the same to trigger this error, but www.domain.com and domain.com are obviously not the same.
I have the same problem.
I have a domain added a domain domain.com to aapanel
After that to solve the problem I added another domain www.domain.com and redirected this domain to
https://domain.com
The redirection worked but we still have a third domain:
https://www.domain.com
This combination will not be redirected. It will be redirected to the index of the first website created on aapanel. Adding this code to .htaccess doesn’t solve the problem.
RewriteEngine On
RewriteCond %{SERVER_PORT} !443$
RewriteRule .* https://%{SERVER_NAME}%{REQUEST_URI} [R=301,L]
RewriteCond %{HTTP_HOST} www.domain.com$ [NC]
RewriteRule .*$ https://domain.com/$1 [R=301,L]
Thank you for the great script!
Do you have a solution for this problem?
timwe1p
do you mean
https://www.domain.com Redirect to https://domain.com not work?
v1sh4l
This problem may be caused by your www.domain.com not deploying ssl but using https access
aaPanel_Jose
the same i was telling from day one. now domain is working on both www.domain.com and domain.com its not good for seo i want domain to open only on domain.com
so i need to redirect from www.domain.com to domain.com. which is not happening from panel
JAY My settings for www to non-www redirect. Works Well.
aapanel_user
its working because your domain was registered as www.domian.com and this option may be removed as new redirect option is enabled.