0

Ok I got this task to do:

There are 2 old URL's mysite.se/thepath and mysite.eu/thepath indexed on google, but that path doesn't exist anymore and I have to redirect the links to the homepage instead : mysite.se for se domain and mysite.eu for eu domain.

As you can see the site is (joomla) 2 language based and each language is linked to specific domain. And there is only one .htaccess at the root of the site.

The one thing that gets me close is placing:

Redirect 301 /thepath http://www.mysite.se

but now even the mysite.eu/thepath redirects to mysite.se but it should go to mysite.eu instead.

I've read many of the posts here, but not one of the answers was close to my issue.

Thank you for any insight on this.

DigingBil
  • 3
  • 1

2 Answers2

1

I think just 1 rules like this would be good enough for both the sites redirects:

RewriteRule ^thepath/?$ /? [R=301,L,NC]
anubhava
  • 761,203
  • 64
  • 569
  • 643
0

EDIT:
How about this?

# If your concerned about direct access to a particular page without the sub-dir # you will want to add something like this
RewriteCond %{REQUEST_URI} ^/thepath
RewriteRule (.*) /$1 [R=301,L]
This was taken from here

Here is more on mod_rewrite.

Community
  • 1
  • 1
csi
  • 9,018
  • 8
  • 61
  • 81
  • HiThanx for the answer, but you missed the point. There are no two site setups. It's only one site and 2 domains pointing to the same public_html root. So it's only one .htaccess – DigingBil Apr 20 '11 at 22:10