Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm trying to host my website into a folder on the FTP, for example, /site. But on the URL i want to remove this folder, so it will be instead of

I've already achieved it using this rewrite script:

RewriteCond %{REQUEST_URI} !^/site
RewriteRule ^(.*)$ site/$1 [L]

But know when i try to access other files into other folders withing the server, i get a "This webpage has a redirect loop", for example,

Does anyone have any idea how to make Rewrite only don't consider existing files within other folders than /site?

share|improve this question

You might be able to use mod_alias to do this:

Alias / /path/to/site
share|improve this answer

Your Answer


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.