Forum Moderators: phranque
Now i want these to redirect to:
http://www.example.com/Fixword-123456-dfghh
http://www.example.com/Fixword-234567-fhjsh
http://www.example.com/Fixword-345678-asdsd
Note - The only change to the url is:
Fixwords changes to Fixword (without the s)
I know this can be done manually by changing each and every url 1 by 1. But how is this done dynamically in htaccess file.
[edited by: jdMorgan at 4:15 pm (utc) on June 21, 2006]
[edit reason] example.com [/edit]
By the use of regular expressions to create a "back-reference" to store the parts of the requested URL you want to 'keep':
RewriteRule ^Fixwords-(.+)$ http://www.example.com/Fixword-$1 [R=301,L]
Jim
I have pages in a subdirectory called metal, that begin with the word jewelry, such as
www.example.com/metal/jewelry4.html
www.example.com/metal/jewelry14-mag.html
Is it possible to key in on the word jewelry and redirect every instance regardless of what comes after the word jewelry?
I have seached high and low and cannot find the mod rewrite code I need to redirect pages like the above to another page.
For more information, see the documents cited in our forum charter [webmasterworld.com] and the tutorials in the Apache forum section of the WebmasterWorld library [webmasterworld.com].
Jim