Results 1 to 11 of 11

I lost my forcing of 'www' onto URL in sub-directories.

This is a discussion on I lost my forcing of 'www' onto URL in sub-directories. within the Troubleshooting forums, part of the vBSEO SEO Plugin category; Before I installed vBSEO I had it so my site forced 'www' onto the URL no matter what page you ...

  1. #1
    Junior Member
    Real Name
    Tyler
    Join Date
    Dec 2007
    Location
    Long Island, New York
    Posts
    28
    Liked
    0 times

    I lost my forcing of 'www' onto URL in sub-directories.

    Before I installed vBSEO I had it so my site forced 'www' onto the URL no matter what page you were on via .htaccess in public_html:
    Code:
    # Forcing www. infront of domain
    RewriteEngine On
    Options +FollowSymLinks
    RewriteCond %{HTTP_HOST} ^(mydomain\.com)$ [NC]
    RewriteRule ^(.*)$ http://www.%1/$1 [R=301,L]
    Now that I've installed vBSEO and I overwrote (accidently) the .htaccess in the forum directory (public_html/forum) it no longer does that for pages in the forum directory.

    I can't figure out how to fix this, any help?

    I tried to add this in red to .htaccess in public_html/forum but it didn't work (I didn't expect it to):
    Code:
    # Forcing www. infront of domain
    RewriteEngine On
    Options +FollowSymLinks
    RewriteCond %{HTTP_HOST} ^(mydomain\.com/forum)$ [NC]
    RewriteRule ^(.*)$ http://www.%1/$1 [R=301,L]

  2. #2
    Senior Member briansol's Avatar
    Real Name
    Brian
    Join Date
    Apr 2006
    Location
    Central CT, USA
    Posts
    6,981
    Liked
    8 times
    it's actualy in the htaccess file already. it's commented out. # = comment

  3. #3
    Junior Member
    Real Name
    Tyler
    Join Date
    Dec 2007
    Location
    Long Island, New York
    Posts
    28
    Liked
    0 times
    What do you mean it is in the .htaccess file already? Are you saying what I uploaded from the vBSEO files had it included?

  4. #4
    Senior Member briansol's Avatar
    Real Name
    Brian
    Join Date
    Apr 2006
    Location
    Central CT, USA
    Posts
    6,981
    Liked
    8 times
    yes

    find:

    #RewriteCond %{HTTP_HOST} !^www\.yourdomain\.com
    #RewriteRule (.*) http://yourdomain.com/$1 [R=301,L]


    at the top of the file.

    remove #
    replace yourdomain

  5. #5
    Junior Member
    Real Name
    Tyler
    Join Date
    Dec 2007
    Location
    Long Island, New York
    Posts
    28
    Liked
    0 times
    Alright, I tried that, but when I did it it redirected me to: http://www.mysite.com/forum//home/my...lic_html/forum.

  6. #6
    Senior Member briansol's Avatar
    Real Name
    Brian
    Join Date
    Apr 2006
    Location
    Central CT, USA
    Posts
    6,981
    Liked
    8 times

  7. #7
    Junior Member
    Real Name
    Tyler
    Join Date
    Dec 2007
    Location
    Long Island, New York
    Posts
    28
    Liked
    0 times
    Hmm, this is not really working. That didn't solve the problem either. :(

  8. #8
    Senior Member briansol's Avatar
    Real Name
    Brian
    Join Date
    Apr 2006
    Location
    Central CT, USA
    Posts
    6,981
    Liked
    8 times
    probably best to open a support ticket then... have the vbseo staff take a look.

  9. #9
    vBSEO Staff Oleg Ignatiuk's Avatar
    Real Name
    Oleg Ignatiuk
    Join Date
    Jun 2005
    Location
    Belarus
    Posts
    25,744
    Liked
    169 times
    The code should be:
    Code:
    RewriteCond %{THE_REQUEST} forum/
    RewriteCond %{HTTP_HOST} !^www\.adminaddict\.com
    RewriteRule (.*) http://www.adminaddict.com/forum/$1 [L,R=301]

  10. #10
    Junior Member
    Real Name
    Tyler
    Join Date
    Dec 2007
    Location
    Long Island, New York
    Posts
    28
    Liked
    0 times
    AdminAddict is actually not the site I'm doing this for, but thanks a lot, that worked!

  11. #11
    vBSEO Staff Oleg Ignatiuk's Avatar
    Real Name
    Oleg Ignatiuk
    Join Date
    Jun 2005
    Location
    Belarus
    Posts
    25,744
    Liked
    169 times
    You are welcome

Similar Threads

  1. Lost Account
    By v12kid in forum Pre-Sales Questions
    Replies: 1
    Last Post: 01-08-2008, 09:50 PM
  2. Redirecting URL's without 'www' prefix?
    By HardDriver in forum General Discussion
    Replies: 2
    Last Post: 08-19-2007, 08:56 PM
  3. Forcing the www. on my site?
    By TheComputerGuy in forum General Discussion
    Replies: 2
    Last Post: 01-03-2007, 07:52 AM
  4. Lost pagerank :(
    By JohnnyBGood in forum General Discussion
    Replies: 6
    Last Post: 11-30-2006, 02:42 AM
  5. I'm lost...
    By smack in forum Troubleshooting
    Replies: 27
    Last Post: 11-13-2006, 12:00 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
  •