Results 1 to 3 of 3

Thread: Site check with www in front or not

  1. #1
    Join Date
    Sep 2007
    Posts
    84

    Default Site check with www in front or not

    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

  2. #2
    Join Date
    Jun 2002
    Location
    Winnipeg Canada
    Posts
    4,913

    Default

    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.

  3. #3
    Join Date
    Nov 2007
    Posts
    227

    Default

    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

Similar Threads

  1. Fixed: admin check cat-structure check
    By Frank71 in forum v3.2
    Replies: 1
    Last Post: 01-15-2006, 05:58 PM
  2. Replies: 0
    Last Post: 01-05-2006, 05:25 AM
  3. Front Page Categories
    By lovelltech in forum v5.x
    Replies: 0
    Last Post: 03-10-2005, 09:43 AM
  4. Hmong Colorado Radio - check out site
    By somxai in forum Sites in Action
    Replies: 3
    Last Post: 12-25-2003, 04:28 AM
  5. Image in front of Link
    By persut in forum v5.x
    Replies: 2
    Last Post: 07-11-2003, 06:11 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •