1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

How to remove the cannonicalization error

Discussion in 'Apache' started by arnie00717, Feb 9, 2009.

  1. #1
    RewriteEngine on
    #
    RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /([^/]+/)*index\.(html?¦php)\ HTTP/
    RewriteRule index\.html$ http://www.example.com/%1 [R=301,L]
    #
    RewriteCond %{REQUEST_URI} ^(.*)//(.*)$
    RewriteRule . http://www.example.com%1/%2 [R=301,L]
    #
    RewriteCond %{HTTP_HOST} !^www\.example.com\.com
    RewriteRule (.*) http://www.example.com/$1 [R=301,L]
    Directoryindex index.html

    This is code i am trying but getting 500 internal server error. Though i am able to remove some problem.

    Options +FollowSymlinks
    RewriteEngine on
    rewritecond %{http_host} ^wondersofrajasthan.com [nc]
    rewriterule ^(.*)$ http://www.wondersofrajasthan.com/$1 [r=301,nc]

    This much code is working but when i paste all it is showing error. Any one could suggest me.
     
    arnie00717, Feb 9, 2009 IP