Canonical redirects

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Jon12345
    Senior Member
    • Oct 2001
    • 360

    Canonical redirects

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

    How can I get it to go to www.mysite.com/forums/ ?

    My 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.access-programmers.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\.access-programmers\.co.uk)?$
    RewriteRule (.*) http://www.access-programmers.co.uk/$1 [R=301,L]
    You can see it here: http://access-programmers.co.uk/forums/

    Thanks,

    Jon
widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
Working...