Forum Moderators: phranque
We have two domain names pointing to one site, but would like the new one with our country's ending (.si) to prevail.
This is how I have corrected the .htaccess:
RewriteEngine On
RewriteCond %{HTTP_HOST} ^example.com$ [OR]
RewriteCond %{HTTP_HOST} ^www.example.com$
RewriteCond %{REQUEST_URI} ^/$
RewriteRule ^(.*)$ http://www.example.si/ [R=301,L]
Redirect works, but it doesn't work as a wild card redirect. Can that also be corrected? For example, calls for www.example.com/info or relative links such as /info give me the 404 error. I would like these calls to point to www.example.si/info, for example.
Thank you very much for your help in advance!
[edited by: jdMorgan at 9:51 pm (utc) on Sep. 20, 2007]
[edit reason] example.com [/edit]
RewriteEngine on
RewriteCond %{HTTP_HOST} ^(www\.)?example\.com [OR]
RewriteCond %{HTTP_HOST} ^example\.si
RewriteRule (.*) http://www.example.si/$1 [R=301,L]
Jim
[edited by: jdMorgan at 9:53 pm (utc) on Sep. 20, 2007]
404 Not Found
The requested URL /info does not exist.
Thank you again (I am only a facultative webmaster and appreciate your help enormously!). Best regards.
PS: my previous .htaccess had the following lines which I dropped, is this OK?
RewriteBase /
RewriteCond %{REQUEST_FILENAME}!-f
RewriteCond %{REQUEST_FILENAME}!-d