Answer the question
In order to leave comments, you need to log in
Let into the .htaccess directory
I use the Kohana framework. The .htaccess is configured so that all requests go through index.php and are processed by the framework core.
If you go to this address site.ru/admin - the framework looks for a controller with this name.
How to make it so that when accessing the site.ru/admin address, the address goes directly to the admin folder and not to index.php?
In .htaccess like this:
# Protect application and system files from being viewed
RewriteRule ^(?:application|modules|system)\b.* index.php/$0 [L]
# Allow any files or directories that exist to be displayed directly
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
# Rewrite all other URLs to index.php/URL
RewriteRule .* index.php/$0 [PT]
Answer the question
In order to leave comments, you need to log in
Figured it out myself =)RewriteRule ^admin(.*) admin$0 [L]
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question