Hi all, looking for some friendly soul to help me with my .htaccess because I can't figure it out! I have one domain pointing at another domain, this is working. However, I have some articles from the old domain that I want to point at the place the articles are now at on the new domain. Both sites are addon/subdomains of another domain on hostgator so I guess it makes it a bit more tricky... I had a look at the redirects in CPanel, and it seems to only allow redirects from the main domain. Here's what I currently have in the .htaccess file on the old domain : Redirect permanent /?p=9 http://www.thenewdomain.com/index.php?option=com_content&task=view&id=19&Itemid=1 Options +FollowSymLinks RewriteEngine on RewriteRule (.*) http://www.newdomain.com/$1 [R=301,L] Code (markup): So the first bit is supposed to forward oldomain.com/?p=9 to the new domain item, but only forwards to newdomain.com.?p=9 right now. Anybody able to help? Thanks
I think the first redirect permanent conflicts with the 2nd redirect rule. Actually i don't see why you need the first bit, the second rule covers the first anyways... And shouldn't it be like this? Options +FollowSymLinks RewriteEngine on RewriteRule ^/(.+) http://www.newdomain.com$1 [R,L] Code (markup):
Options +FollowSymLinks +Indexes RewriteEngine on RewriteBase / RewriteRule ^(.*)$ http://www.domain.com/$1 [R=301,L]
Thanks for both the replies.. however, I have several different pages that I want to forward to several other pages, with different ID/file scheme... in short, i need to forward them to distinct and different pages... both these pieces of code don't seem to address that, or a I missing something?