views:

322

answers:

1

Hi

I'm using Joomla 1.5.14 and I configured SEO as in the following image

alt text

Now I need to map a few old URL to the new site

let's say that I need to map htp://mysite/old.html to the new Joomla page

http://mysite/index.php?option=com_content&view=article&id=32&Itemid=70

I added in my .htaccess file the following

RewriteRule ^old\.html$ index.php?option=com_content&view=article&id=32&Itemid=70  #works!!

this works fine, but if I use the SEF URL in .htaccess (let's say the above page can be reached with htp://mysite/contacts.html), I obtain a 404 error

RewriteRule ^old\.html$ contacts.html   #this does not work

Now the question:

Is it possible use SEF URLs in RewriteRule? where am I wrong?

thank you in advance

stefano

+2  A: 

I think the problem is because Apache rewrites old.html to a page that doesn't actually exist, but rewritten in a different rule.

If you truly want to "rewrite" - in other words, have the page stay as old.html in the browser - then you don't need to do anything.

However to avoid duplicate content it's probably better to do a 301 redirect:

Redirect 301 old.html http://yoursite.com/contact.html

(You may need a forward slash at the front of old.html)

DisgruntledGoat
thanks!I think you're right about Apache rewriting old.html to an unexistent page (even if mod_rewrite should "run" before joomla stuff).Redirect works, even if it adds a roundtrip, and I don't know if it has any SEO counter-indication
Stefano
It's generally better for SEO as far as I'm aware, since you're giving Google etc one URL per piece of content, and telling it to count links for `old.html` as if they were links for `contact.html`
DisgruntledGoat