1

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

2 Answers 2

0

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.

0

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.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .