1

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?

3

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.

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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