Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

If I install a cms at the root of my domain, and use URL rewriting to get clean URLs, I can no longer host files in arbitrary directories under the root. (Files that aren't suitable for the cms to handle.) So I am looking for a way to achieve the following:

  • install the cms in a subdirectory, rather than root, e.g. mydomain.com/cms/
  • when a browser visits mydomain.com, it should be redirected to mydomain.com/cms/ to see the main page of the site.
  • when a browser visits mydomain.com/some-other-folder, it should be able to access files there in a standard way, without interference from the cms.

I tried the simple-minded solution of

Redirect / /cms

but this only creates an infinite loop. What are my other options, please?

share|improve this question

1 Answer 1

Looks like ServerFault already had the answer which I missed, since the .htacces tag wasn't used:

RedirectMatch ^/$ /cms/

seems to do what I need.

I would still appreciate comments if this is the right thing to do or if there are any side issues to be aware of.

share|improve this answer
    
I'd say this is the right thing to do. –  Morven Sep 18 '09 at 0:08

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.