Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Solved: 9 Years, 9 Months, 1 Week ago cant get canonical rewrite rule to work
#1
Solved: 9 Years, 9 Months, 1 Week ago
Hi All,

I am trying to get the canonical rule below to work (with my URL instead of the below) however it just seems to be ignored.

RewriteEngine on
rewritecond %{http_host} ^domain.net/forums [nc]
rewriterule ^(.*)$ http://www.domain.net/forums/$1 [r=301,nc]

This should be just doing a 301 redirect of all http://mydomain
to
http://www.mydomain

However when I call mydomain.net/forum it does not get redirected to www

Any ideas?

I am using the google SEO plugin and I am sure this may have something to do with it. I don't want to use [L] on these because it still needs to call the rest afterwards right?

Dan

Oh found the issue. it was my rewrite rule, changed it to

RewriteCond %{HTTP_HOST} !^www\. [NC]
#2
Solved: 9 Years, 9 Months, 1 Week ago
Your rewritecond says to only rewrite URLs under /forums
#3
Solved: 9 Years, 9 Months, 1 Week ago
(2013-06-11, 08:36 PM)laie_techie Wrote: Your rewritecond says to only rewrite URLs under /forums

yep, that is the point of that rewrite rule. It's canonical for the forums directory only. The main directory is Joomla and has its only canonical.

All good


Forum Jump:


Users browsing this thread: 1 Guest(s)