Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Say I have my website stored on domain.com/mysite I add a rule in .htaccess to rewrite the URL to domain.com

Is there any downside to storing the site in a subfolder and rewriting the URL like this? Or is this standard practice - Possibly having different iterations of the site in subfoldrs etc...

Thanks

share|improve this question

2 Answers 2

There's no downside using this method but if you can use virtual host, it's more better if you plan to add more directory later.

share|improve this answer

There's a minor downside in that you have to enable Overrides for at least that directory. And possibly elsewhere in your directory tree. This may allow a little looser security than you expect (what if someone is an unexpected writer to your file tree) vs your config file security (which tend to have tighter security). It also means the various extra files must be stat()ed and the htaccess file read per request.

In >99% of the time, these side effects are infinitesimal and the convenience of the overrides is greater than the other concerns tho. I wouldn't see any issue doing this on my site.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.