-
Notifications
You must be signed in to change notification settings - Fork 115
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
excluding a directory from using the route? #67
Comments
From what I know traditional routes should also work fine, let say you have file feature.php in folder abc domain.com/abc/feature.php should also work |
It's doesn't seems to work in my case, since everything is passing thru index.php (router) already, loading config, etc... within the htaccess file. Some conflics occurs. i may put the entire routing in a if/else statement but it's not very clean... Better ways are welcome. 👍 |
Requests to existing files and folders should be delivered directly without going through the index.php. There are rules to achieve this inside the .htaccess: RewriteCond %{REQUEST_FILENAME} !-f You can test this rules: Place a file (test.txt) into your root folder and try to call it: https://mydomain.com/test.txt |
I think I wasn't clear enough... I'm not talking about accessing a particular file within the /abc/ folder.
note that the first regex will glab all the possible paths & files on the root and the subfolders. It is useful when you create folders from an admin panel for example. could be useful to have an 'exclude' method to remove a file/path from the possibilities. |
3 ways you can achieve that @unikoca
You can even go further to define which words to begin with in your route
|
Hi,
On a particular project, i'm using your library on the root of the domain, everything works fine.
But now, they install a folder ( ex: /abc/ ) that doesn't need to be managed by your routing.
Is there a way to 'exclude' a folder from your routing?
Regards,
The text was updated successfully, but these errors were encountered: