SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Guru
    Join Date
    Nov 2000
    Posts
    740
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Canonical recdirect issue

    I understand that with Google, you need to get the canonical redirect working correctly, else you might lose PR.

    When you go to my homepage, if you type
    example.co.uk, it goes to www.example.co.uk. But if you go to example.co.uk/forums/, it stays there, rather than redirecting to www.example.co.uk/forums/.

    How can I get it to go to www.
    example.co.uk/forums/ ?

    My root htaccess code is:

    Code:
    # Externally redirect only direct client requests for /index.php to /
    RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /([^/]+/)*index.(html?|php)\ HTTP/
    RewriteRule ^(([^/]+/)*)index.(html?|php)$ http://www.example.co.uk/$1 [R=301,L]
    #
    # Externally redirect to canonicalize the domain name if a non-canonical
    # hostname is requested, in order to prevent duplicate-content problems
    RewriteCond %{HTTP_HOST} !^(www\.example\.co.uk)?$
    RewriteRule (.*) http://www.example.co.uk/$1 [R=301,L]
    In my forums folder, I have this htaccess code:

    Code:
    AcceptPathInfo On
    
    RewriteEngine On
    RewriteRule ^((urllist|sitemap).*\.(xml|txt)(\.gz)?)$ vbseo_sitemap/vbseo_getsitemap.php?sitemap=$1 [L]
    
    xcache.var_size =      3M
    xcache.var_count =       2
    xcache.var_slots =      8K
    xcache.var_ttl  =       7200
    xcache.var_maxttl  =     14400
    xcache.var_gc_interval =   300

  2. #2
    SitePoint Wizard bronze trophy PicnicTutorials's Avatar
    Join Date
    Dec 2007
    Location
    Carlsbad, California, United States
    Posts
    3,625
    Mentioned
    15 Post(s)
    Tagged
    0 Thread(s)


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
  •