php - Is there a major downside to using .htaccess files in your svn/git repository? -


If our .htaccess files are completely for modern rewriting, then submit .htaccess files with other files. Is there a security / development negativity in your repository?

For various reasons (our SEO Optimizer wants to add a lot of URLs as new promotions etc.) we need some fine writing rules inside these files. Would I be better in pursuing routing and dealing with php-land? Or .htaccess is reading through apache?

.htaccess files are not exposed through a web server, so this is not a security risk.

I remember, once you use an .htaccess file, you already have Only agreed to pay the price, that price will appear in full place, for every request, .htaccess files though this is a display issue

I think your ideal solution Do not use .htaccess files, but those rules have to be set in httpd.conf. PHP is not better on redirection from Apache, so there is no help. It is best to develop the answer to the display, and then to move the rules in the server core for production.

For version control, if it is full of a file, which is necessary for code, yes, I will put it in version control. I'll actually fix it right now. If a lot of people are adding all the redirect rules to .htaccess files in all places, then you want to be able to:

  1. Roll back the changes
  2. Point to the finger! ;)

Comments