Jump to content

Recommended Posts

Posted

I have a new domain name, with the old domain name parked.

 

The problem that I am having is that all urls containing the domain name redirect to the home page of the new domain name. Here is an example:

 

Input the following: http://www.15minutestoriches.com/2009/01/0...-your-expenses/

 

Redirects to: http://www.wealthitself.com

 

I want it to redirect to: http://www.wealthitself.com/2009/01/04/5-r...-your-expenses/

 

Here is the code in the .htaccess file

><IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>

RewriteBase /
RewriteCond %{HTTP_HOST} ^(www\.)?15minutestoriches\.com
RewriteRule (.*) http://www.wealthitself.com/$1 [R=301,L]

 

Any suggestions?

 

Thanks

Posted (edited)

will this work?

 

 

><IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>


RewriteCond %{HTTP_HOST} ^15minutestoriches.com$ [OR]
RewriteCond %{HTTP_HOST} ^www.15minutestoriches.com$
RewriteRule ^(.*)$ http://www.wealthitself.com/$1 [R=301,L]

 

I think the thing you have missed is the the full regular expression ... (.*) in the rewrite rule might need to be ^(.*)$ to denote the start and end of the string. I am no mod rewrite expert though but worth a shot?

Edited by OJB
Posted

Thanks - I tried it but it didn't work.

 

will this work?

 

 

><IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>


RewriteCond %{HTTP_HOST} ^15minutestoriches.com$ [OR]
RewriteCond %{HTTP_HOST} ^www.15minutestoriches.com$
RewriteRule ^(.*)$ http://www.wealthitself.com/$1 [R=301,L]

 

I think the thing you have missed is the the full regular expression ... (.*) in the rewrite rule might need to be ^(.*)$ to denote the start and end of the string. I am no mod rewrite expert though but worth a shot?

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...