Jump to content

Best way to do a large number of redirects...


PHP_tyro

Recommended Posts

 

Hi all.

 

I'm coming from an ASP environment and need to convert a website for hosting on Linux/Apache. I think I can handle most of it bit by bit, but there's one thing I need advice on.

 

I have a 404.asp file that handles a lot of redirections. My explorations so far tell me that the way to handle redirection with Linux/Apache is to include a line like the following in the .htaccess file:

 

redirect 302 /DICTIONARY http://www.dictionary.com

 

Simple enough, but what bothers me about that method is the number of redirects that have to be inserted in the file -- at the moment it would add over 400 lines to .htaccess, and more will need to be added over time.

 

Is the size of .htaccess an important consideration?

 

Is there a better way to do this? I like the idea of having a single plain text file containing all the redirections and calling it into a server-side page for processing.

 

Also, I don't understand the difference between 302 and 301 redirects. Temporary and permanent, yes, but what is the effective difference?

 

Many thanks,

Billy

 

Link to comment
Share on other sites

400 lines is what? 1-3kb filesize? Should be no worry there.

 

http://www.seomatrix.com/articles/301-redirects.php

 

Yes, I've seen a few articles that talk about 301/302 and page rank, but I don't care about maintaining page rank in this case, because I'm referring/redirecting to sites not owned by me and over which I have no control. For example they might be sites for which I am an affiliate, or sites I am referring my visitor to for more information, or for a download or whatever.

 

I guess in that case it probably doesn't matter whether I use 301 or 302?

 

I think he doesn't want to write them all?

 

No, that's not a problem, I don't need to write them all out. I copied the lot in one go from the IIS server and used Microsoft Word to edit them from the ASP format to the format I quoted above, then pasted them back into Notepad. They are all converted to "Linux speak" and ready to go.

 

The main reason I'd like to have them in a text file that could be automatically imported for server-side processing is for ongoing ease of maintenance. Just editing a text file and FTP'ing it to the server would be simpler and less dangerous than frequent messing with the .htaccess file.

 

 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

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

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  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...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.