Results 1 to 6 of 6

Thread: www and non www url issue

  1. #1
    1901gt is offline Web Designer
    Join Date
    Jan 2009
    Location
    Singapore
    Posts
    235
    Blog Entries
    2
    Thanks
    35
    Thanked 32 Times in 24 Posts

    www and non www url issue

    When I try logging in my vbulletin forum via www, it will still show me as logged out.

    But when I type the url without the www, I will be logged in as per normal.

    Any idea how to fix this so that when user open up the site via www or without www, they won't encounter this issue?

    If I use .htaccess redirect, how do I add it to mine bearing in mine I have vBseo installed in my forum?

    RewriteEngine On
    RewriteCond %{HTTP_HOST} ^www\.(.+)$ [NC]
    RewriteRule ^(.*)$ http://%1/$1 [R=301,L]

  2. #2
    Will.Spencer's Avatar
    Will.Spencer is offline Retired
    Join Date
    Dec 2008
    Posts
    5,033
    Blog Entries
    1
    Thanks
    1,010
    Thanked 2,329 Times in 1,259 Posts
    For NetBuilders.org, I have this code in our .htaccess file:
    Code:
    # Redirect to www.
    RewriteCond %{HTTP_HOST} ^netbuilders\.org$ [NC]
    RewriteRule ^(.*)$ http://www.netbuilders.org/$1 [R=301,L]
    I don't think I added this, I think that I only uncommented it and edited the URLs.
    Submit Your Webmaster Related Sites to the NB Directory
    I swear, by my life and my love of it, that I will never live for the sake of another man, nor ask another man to live for mine.

  3. #3
    1901gt is offline Web Designer
    Join Date
    Jan 2009
    Location
    Singapore
    Posts
    235
    Blog Entries
    2
    Thanks
    35
    Thanked 32 Times in 24 Posts
    How do I create a redirect to the url without the www?

  4. #4
    Aquarezz's Avatar
    Aquarezz is offline Master Net Builder
    Join Date
    Dec 2008
    Location
    Belgium
    Posts
    3,853
    Blog Entries
    4
    Thanks
    683
    Thanked 591 Times in 463 Posts
    Quote Originally Posted by 1901gt View Post
    How do I create a redirect to the url without the www?
    Like this should work:
    Code:
    # Redirect without www.
    RewriteCond %{HTTP_HOST} ^SITENAME\.EXTENSION$ [NC]
    RewriteRule ^(.*)$ http://SITENAME.EXTENSION/$1 [R=301,L]
    Check it out
    |Nico Lawsons

  5. #5
    Will.Spencer's Avatar
    Will.Spencer is offline Retired
    Join Date
    Dec 2008
    Posts
    5,033
    Blog Entries
    1
    Thanks
    1,010
    Thanked 2,329 Times in 1,259 Posts
    Ohh... sorry.. I misread.

    I would try this:
    Code:
    # Redirect to no-www.
    RewriteCond %{HTTP_HOST} ^www\.netbuilders\.org [NC]
    RewriteRule (.*) http://netbuilders.org/$1 [R=301,L]
    Submit Your Webmaster Related Sites to the NB Directory
    I swear, by my life and my love of it, that I will never live for the sake of another man, nor ask another man to live for mine.

  6. Thanked by:

    1901gt (20 April, 2009)

  7. #6
    1901gt is offline Web Designer
    Join Date
    Jan 2009
    Location
    Singapore
    Posts
    235
    Blog Entries
    2
    Thanks
    35
    Thanked 32 Times in 24 Posts
    Quote Originally Posted by Will.Spencer View Post
    Ohh... sorry.. I misread.

    I would try this:
    Code:
    # Redirect to no-www.
    RewriteCond %{HTTP_HOST} ^www\.netbuilders\.org [NC]
    RewriteRule (.*) http://netbuilders.org/$1 [R=301,L]
    Thanks. This work for me.

Similar Threads

  1. [Bug] some issue with forum ....
    By SonnyCooL in forum Announcements and Suggestions
    Replies: 8
    Last Post: 15 March, 2011, 00:21 AM
  2. Issue with CSS Sprites
    By Zash in forum Web Design
    Replies: 2
    Last Post: 12 December, 2009, 19:28 PM
  3. serious issue with glype
    By almecho in forum Web Proxies
    Replies: 19
    Last Post: 27 August, 2009, 00:04 AM
  4. Need some help with a CSS issue
    By Mr.Bill in forum Programming
    Replies: 5
    Last Post: 16 December, 2008, 20:39 PM

Tags for this Thread

Bookmarks

Posting Permissions

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