Limitations of .htaccess

jacobmartin

Newbie
Joined
Oct 24, 2015
Messages
1
Reaction score
0
Hello All, I have a query.
I have 2 lists of URLs.
1st list is to be redirected (301 redirection) to the 2nd list. (There are more than 1000 URLs in both the list)
My 1st query: What is the maximum no of URL redirections (301) that can be done in a .htaccess file?
My 2nd query: How many .htaccess files can I use in a directory, If I have to perform both 2 operations (404 and 301 redirections)?


Thanks in Advance.
 
1: Technically there is no limit to the number of redirects you can do through Htaccess file. However do check if it affects the load time(some hosting providers put artificial limits)
2: Having just one Htaccess in the root is advisable and you can put in your codes for both redirects.
 
No limit - I had a site once with a good few thousand lines in htaccess and it didnt cause any issues.
Having said that, there are potentially better ways of doing it - if the old and new urls follow any sort of pattern then you can probably use some regex to do it in less lines.

I am not an expert on that but you can normally find how to do it on Google.
 
Back
Top