hosted by liquidweb


Go Back   Web Hosting Talk : Web Hosting Main Forums : SEO / SEM Discussions : Large Number of 301 Redirects
Reply

SEO / SEM Discussions Discuss Search Engine Optimization (SEO) techniques and philosophies -- The art of Search Engine Marketing (SEM) -- Social Media Optimization (SMO) -- And all points in between. *NOTE* If you feel you need to link to or mention your domain name, you must use the Other Reviews forum.
Forum Jump

Large Number of 301 Redirects

Reply Post New Thread In SEO / SEM  Discussions Subscription
 
Send news tip View All Posts Thread Tools Search this Thread Display Modes
  #1  
Old 03-30-2008, 01:44 AM
webtender webtender is offline
Newbie
 
Join Date: Jun 2006
Posts: 16

Large Number of 301 Redirects


Hi, one of my clients is remodeling their website...and I need to figure out a solution to handle a large number of 301 redirects on Apache/Linux server. I know when I work with Windows boxes we've used ISAPI rewrite to handle this type of thing using map files, speeds things up significantly over having all the rewrites in htaccess file.

Does anyone know of an equivalent program for Linux/Apache that I could use to setup a large number of 301 redirects? It's not possible for me to do so on this particular site using .htaccess at all, so I must come up with another solution.

Any of you Linux experts run into this problem before and would you mind sharing any tips on how you did so?

I could always get someone to write a special script I would imagine that would have the old/new urls in a database, and then a custom 404 page that did a lookup, but if anyone has done this before and/or has some options or tips to share or other ideas, I'd be very grateful for your input.

Thanks

Reply With Quote


Sponsored Links
  #2  
Old 03-30-2008, 10:08 PM
1boss1 1boss1 is offline
Web Hosting Master
 
Join Date: Jan 2004
Location: Oztrayla Mate!
Posts: 572
Personally i'd try and install mod_rewrite, using .htaccess is going to be a lot cleaner than scripting methods. Have you got access to the httpd.conf file? You can place your rewrites in there instead, it's actually a better method than .htaccess in directories because the server doesn't need to traverse folders looking up the .htaccess file on page loads.

__________________
Great Host = WiredTree.com Managed VPS Hosting

Reply With Quote
  #3  
Old 03-31-2008, 02:13 AM
webtender webtender is offline
Newbie
 
Join Date: Jun 2006
Posts: 16
Large number of rewrites

Hi thanks for the response. They have mod_rewrite installed on the server...that's not the issue. It's that it's not logical nor can the processor process thousands of rewrites in the httpd.conf file nor in the .htaccess file.

With a windows server I can have this taken care of using what's called a map file

which is an external file that is called from the main configuration file of ISAPI rewrite and allows one to have thousands of rewrites in a configuration file that is efficient and works great on all the servers I've used it on.

My dilemma, is that I don't know what options folks use when redirecting large numbers of files in Linux and was hoping I'd get some feedback here from anyone who had gone through this type of process before.

Reply With Quote
Sponsored Links
  #4  
Old 03-31-2008, 04:08 AM
1boss1 1boss1 is offline
Web Hosting Master
 
Join Date: Jan 2004
Location: Oztrayla Mate!
Posts: 572
Quote:
Originally Posted by webtender View Post
Hi thanks for the response. They have mod_rewrite installed on the server...that's not the issue. It's that it's not logical nor can the processor process thousands of rewrites in the httpd.conf file nor in the .htaccess file.
In the httpd.conf file, your rewrite rules will get mapped in a similar way when Apache is started and after that you won't suffer a performance hit on pageloads.

Also you may not need thousands of different directives, some rules can be written in a couple of lines that effect thousands of pages. It just depends on what your trying to do exactly. For instance the other week i redirected a 285,000 page website to a new URL when it underwent a name change just by doing:

Quote:
RewriteEngine On

redirect 301 / http://www.oldsite.com/
So anyone who went to oldsite.com/somepage.php landed at newsite.com/somepage.php

If you let us know what URL structure your rewriting from and to, your .htaccess may only be several lines to accomplish the task.

__________________
Great Host = WiredTree.com Managed VPS Hosting

Reply With Quote
  #5  
Old 03-31-2008, 06:47 AM
bear bear is offline
Community Leader
 
Join Date: Oct 2002
Location: cognito
Posts: 17,439
Quote:
Originally Posted by 1boss1 View Post
Code:
 RewriteEngine On

redirect 301 / http://www.oldsite.com/
So anyone who went to oldsite.com/somepage.php landed at newsite.com/somepage.php
That doesn't appear correct to me. Shouldn't it be:
Code:
Redirect 301 / http://www.newsite.com/
And does it really carry the URI request when using this? I'd always thought the content after the "/" had to be captured via rewrite or a similar mechanism such as:
Code:
/(.*) http://www.newsite.com/($1)
Not needed?

__________________
Have problems (don't we all)? Head over to the help desk
If at first you don't succeed, that's one data point.


Reply With Quote
  #6  
Old 03-31-2008, 06:41 PM
1boss1 1boss1 is offline
Web Hosting Master
 
Join Date: Jan 2004
Location: Oztrayla Mate!
Posts: 572
Quote:
Originally Posted by bear View Post
That doesn't appear correct to me. Shouldn't it be:
Code:
Redirect 301 / http://www.newsite.com/
Correct yes, a shift malfunction and redirect technically should of been Redirect with a capital although it will work using either upper/lower case.

Quote:
And does it really carry the URI request when using this? I'd always thought the content after the "/" had to be captured via rewrite or a similar mechanism such as:
Code:
/(.*) http://www.newsite.com/($1)
Not needed?
Nope, the rule i have above carries the URI request and going to oldsite.com/some/random-page.php takes you directly to newsite.com/some/random-page.php

__________________
Great Host = WiredTree.com Managed VPS Hosting

Reply With Quote
  #7  
Old 04-01-2008, 07:47 AM
webtender webtender is offline
Newbie
 
Join Date: Jun 2006
Posts: 16
Thanks for the additional info... appreciate the help!

Reply With Quote
Reply

Related posts from TheWhir.com
Title Type Date Posted
Prolexic Technologies Report Shows Large-Scale DDoS Attacks Are Growing in Size Web Hosting News 2013-01-17 11:19:17
Phishing Attack Trends by Country Represented in Netcraft Map Web Hosting News 2012-12-13 15:13:37
Domain Registrar Dotster Partners with Online Domain Marketplace Sedo Web Hosting News 2011-10-18 15:47:53
Netcraft Web Server Survey Finds Large Growth of Amazon EC2 Sites Web Hosting News 2011-08-05 19:02:44
Hosting Provider Web.com Launches Mobile Website Service Web Hosting News 2011-06-20 17:50:17


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes
Postbit Selector

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 Off
HTML code is Off

Forum Jump
Login:
Log in with your username and password
Username:
Password:



Forgot Password?
Advertisement:
Web Hosting News:



 

X

Welcome to WebHostingTalk.com

Create your username to jump into the discussion!

WebHostingTalk.com is the largest, most influentual web hosting community on the Internet. Join us by filling in the form below.


(4 digit year)

Already a member?