Answer the question
In order to leave comments, you need to log in
More than 500 lines in htaccess, what threatens?
Hello. I'm moving to a new engine.
The online store has about 550 products.
Naturally, you will need to do a redirect.
We do it through htaccess, a familiar programmer said that 500 lines in htaccess is not good.
You can't leave links the same.
ps Hosting on Apache, engine on PHP.
What can a large htaccess affect and are there other options?
Answer the question
In order to leave comments, you need to log in
Use in config, not htaccess, and there will be no problems.
At server start it is read once.
Yes, 500 lines in .htaccess is really not very cool, and here's why:
- If you need to change something, you will need to pick the file manually (although apparently not in your case)
- If the server is weak (for example, virtual hosting) - apache will parse .htaccess with each request to the server, which will affect the speed of work.
Are there other options? Yes. For example, aliases for URLs that your PHP engine will process. Such functionality is available in some CMS. If not, then write a PHP solution for your engine (look for a ready-made plugin type), but this already depends on your engine.
In htaccess - dumb, really. Nginx can easily chew on 500 such constructs:
location =/products/382309 {
return 301 http://domain.tld/products/unique-n... ;
}
Only how you will understand them yourself later - this is, mind you, not for me =)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question