Asked by rowby
at 2024-01-08 08:21:09
Point:500 Replies:5 POST_ID:828876USER_ID:11592
Topic:
Apache Web Server;;
Hello
I have a number of pages that start with the same words in the file name that I want to redirect to another domain.
Example:
http://www.olddomain.com/fruits-that-taste-good
http://www.olddomain.com/fruits-that-taste-bad
http://www.olddomain.com/fruits-that-taste-sweet
http://www.olddomain.com/fruits-that-taste-sour
I want to do a 301 redirect to the following
http://www.newdomain.com/fruits-that-taste-good
http://www.newomain.com/fruits-that-taste-bad
http://www.newdomain.com/fruits-that-taste-sweet
http://www.newdomain.com/fruits-that-taste-sour
Is there a way to do a rule that will take the wild card "fruits-that-taste-*" and direct all of those to the new domain -- without having to type each page
Something like this (of course I am not using the right syntax:
Redirect 301 http://www.olddomain.com/fruits-that-taste-* http://www.newdomain.com/*
Not sure if this is at all possible. Looking at my existing htaccess file I see that it is already using RewriteRule for other items. I read somewhere that RewriteRule is used for more elaborate directs. So it is available if it helps with this solution.
Thanks!
Rowby
I have a number of pages that start with the same words in the file name that I want to redirect to another domain.
Example:
http://www.olddomain.com/fruits-that-taste-good
http://www.olddomain.com/fruits-that-taste-bad
http://www.olddomain.com/fruits-that-taste-sweet
http://www.olddomain.com/fruits-that-taste-sour
I want to do a 301 redirect to the following
http://www.newdomain.com/fruits-that-taste-good
http://www.newomain.com/fruits-that-taste-bad
http://www.newdomain.com/fruits-that-taste-sweet
http://www.newdomain.com/fruits-that-taste-sour
Is there a way to do a rule that will take the wild card "fruits-that-taste-*" and direct all of those to the new domain -- without having to type each page
Something like this (of course I am not using the right syntax:
Redirect 301 http://www.olddomain.com/fruits-that-taste-* http://www.newdomain.com/*
Not sure if this is at all possible. Looking at my existing htaccess file I see that it is already using RewriteRule for other items. I read somewhere that RewriteRule is used for more elaborate directs. So it is available if it helps with this solution.
Thanks!
Rowby