Hi,
I have some people which post their site with 2 ways as
http://mysite.com
http://www.mysite.com
and the script dont understand that the site is double
How can be the check in order to avoid post of site with www and without www
BR
Antonis
Hi,
I have some people which post their site with 2 ways as
http://mysite.com
http://www.mysite.com
and the script dont understand that the site is double
How can be the check in order to avoid post of site with www and without www
BR
Antonis
You could force the www in the form, or you could do a search and replace in the database before you do a duplicate check.
However the issue is that not all sites use both www and nonwww. Some people don't know how to set their server up to use both (honest, I've seen it. a LOT). Some people only use nonwww and have thir server configured to display the default page (apache, cpanel, whatever) on the www.
One of the reasons is for SSL certificates. SSL only works for what you enter it for. So when creating your cert if you enter www.yoursite.com then the certificate is ONLY valid if users visit www.yoursite.com. If they visit yoursite.com they WILL get an error saying the certificate is invalid.
It's messed up, but it's true. Personally I'd say force all sites to include www as the majority of them will work anyways. Even if they use htaccess to redirect to www or nonwww it will be fixed on their end and you don't need to worry about it.
Are you getting a lot of domains that are doing this? My banned mod checks whether the domain is in the banned list with and without the www. I am sure that same portion of code could be modified to check for duplicates when they submit the code. I am busy right now, but if you know some php, I am sure you could get it to work for your purpose. PM me and I can send you the code.
The easy solution would be to do as Bruce suggested and require the www.
Your other choice would be to PM me. When I get some free time, I can modify it to do what you need. It may be a week or more though. I will do it for free, if I can even get it working properly.
Wayne
For questions related to any mods I developed, please contact me by pm or email at webmaster [at] scriptdragon [dot] com