Hey Guys, I am trying to redirect a portion of my website to avoid duplicate content issues. Right now if you visit my site these are separate pages: http://www.mysite.com/blog and http://www.mysite.com/blog/ -- I am trying to redirect every URL in my blog ONLY to the URL without the trailing slash. However I do not want this rule to apply for URLs for my main site (http://www.mysite.com). Any suggestions? Best Regards, Nick
So I figured the rewrite will look something like this: rewritecond %{http_host} ^mysite.com/blog [nc] rewriterule %{http_host} ^mysite.com/blog/ [r=301,nc] Code (markup): But I might be off by a mile here... any ideas guys?
Ok so I found a code that might work RewriteCond %{REQUEST_URI} ^/blog/$ RewriteRule ^(.*)$ http://%{HTTP_HOST}/$1/ [R=301,L] I just have two questions: 1. What does the $ in /blog/$ mean and I need it to say anything after /blog so I think I might have to have it look like /blog/* or something. 2. What does the $1 mean in http://%{HTTP_HOST}/$1/ 2.