Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

emmaus's avatar

.htaccess

Good evening everyone, To be honest, I'm ignorant about .htaccess files. I'm working on a laravel application which is where I created two folders: dev and test; each containing a .htaccess file in the public directory and at the root of their subfolders. My problem is that all the queries I make from these folders do not work and I'm sure that it comes from .htaccess files contained in the parent folder and subfolders, here's who it looks like (taken on the net that 'to previously it solved my problems):

Options -MultiViews -Indexes

RewriteEngine On
RewriteBase /
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]


# Handle Authorization Header
RewriteCond %{HTTPS:Authorization} .
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]

# Redirect Trailing Slashes If Not A Folder...
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} (.+)/$
RewriteRule ^ %1 [L,R=301]

# Handle Front Controller...
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.+)$ /index.php/ [L]

0 likes
2 replies
jove's avatar

I'm a bit confused what you are asking and what you are trying to achieve.

emmaus's avatar

Hello joveice, my problem is very simple. I want to have all request in my subdirectories (dev, test, ...) join the appropriate route (controller) inside themselves not those which are in the root folder project (evenif it is the same project). I hope I have been clearer.

Please or to participate in this conversation.