The Slim Framework support forum has moved to http://discourse.slimframework.com. This Tender forum is no longer maintained or monitored.

Directories

Matt's Avatar

Matt

29 Jul, 2012 02:13 AM

How do I prevent routing from occurring if there is a directory with that name in the same folder slim is in? Or, how do I access the directory instead of being routed by slim?

/webroot

  /test
  .htaccess
  index.php

I want to go to the directory test by using http://www.example.com/test instead of having slim route the word test.

  1. 1 Posted by Matt on 29 Jul, 2012 02:19 AM

    Matt's Avatar

    Just answered my own question. By using

    RewriteCond %{REQUEST_FILENAME} !-d

    in the .htaccess file it firsts check to see if there is a directory by that name and if not then it moves onto using slim.

  2. Support Staff 2 Posted by Brian Nesbitt on 29 Jul, 2012 02:38 AM

    Brian Nesbitt's Avatar

    Yup, you got it ! :-)

  3. Brian Nesbitt closed this discussion on 29 Jul, 2012 02:38 AM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac