Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

Website and Server Administration Forum


You are currently viewing our Website and Server Administration Forum as a guest. Please register to participate.
Login



Reply
301 Redirect Multiple Pages
Old 08-15-2008, 01:40 PM 301 Redirect Multiple Pages
Junior Talker

Posts: 2
Trades: 0
Greetings!

I need to redirect a 100+ web pages to a new directory and will be using a 301 redirect. Instead of having to write a redirect for every single page…is there a wildcard method I can use in the .htaccess file instead? I have a feeling I am going to have to go to the server level to handle this.

All of the pages that need to be moved start with “c-“:

/online-store/scstore/c-"product-name".html

They all need to be moved to:
/beer-store/

I couldn’t find anything in relation to my question on the web successfully, just on moving entire directories. Currently there are other things in that scstore directory that do not need to be moved so I do not have that option.

If anyone has any input it would greatly be appreciated.

Thanks,
Nikki
Higsi is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 08-19-2008, 05:00 AM Re: 301 Redirect Multiple Pages
mtishetsky's Avatar
King Spam Talker

Posts: 1,226
Name: Mike
Location: Mataro, Spain
Trades: 0
In your .htaccess

RewriteEngine On
Rewrite online-store/scstore/(c-.*) /beer-store/$1 [L,R=301]
__________________

Please login or register to view this content. Registration is FREE
-
Please login or register to view this content. Registration is FREE
-
Please login or register to view this content. Registration is FREE

And don't forget to give me talkupation!
mtishetsky is offline
Reply With Quote
View Public Profile Visit mtishetsky's homepage!
 
Old 08-19-2008, 12:25 PM Re: 301 Redirect Multiple Pages
Junior Talker

Posts: 2
Trades: 0
Thanks mtishetsky,

I tried that and when I went to one of the c- pages I got a 500 Internal Server Error (The server encountered an internal error or misconfiguration and was unable to complete your request.). Is there something in particular that needs to be enabled server side to allow this to work?

Thanks,
Nikki
Higsi is offline
Reply With Quote
View Public Profile
 
Old 08-20-2008, 03:03 AM Re: 301 Redirect Multiple Pages
mtishetsky's Avatar
King Spam Talker

Posts: 1,226
Name: Mike
Location: Mataro, Spain
Trades: 0
First of all when you see the 500 error you should look into your server error log
__________________

Please login or register to view this content. Registration is FREE
-
Please login or register to view this content. Registration is FREE
-
Please login or register to view this content. Registration is FREE

And don't forget to give me talkupation!
mtishetsky is offline
Reply With Quote
View Public Profile Visit mtishetsky's homepage!
 
Reply     « Reply to 301 Redirect Multiple Pages
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.13589 seconds with 12 queries