I am trying to rewrite the path of my css, but due to the use of 2 .htaccess files only one of my URLs works. My structure is as follows:
- htdocs (root)
- index.html
- .htaccess (1)
- Development
- Projects
- redirect
- index.php
- .htaccess (2)
- redirect
- Projects
Htaccess (1)
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule style css/style.css
index.php
<html>
<head>
<link rel="stylesheet" type="text/css" href="style">
</head>
<body>
<p>This is in red?</p>
</body>
</html>
Htaccess (2)
RewriteEngine on
RewriteRule ^(redirect)/(.*) /Desenvolvimento/Projetos/redirect/index.php?projeto=$1;request=$2
By using the URL ' link ', CSS works. However, when I use the URL I want, ' link ', CSS does not work. Is there any way to refactor my htaccess rules in the framework I use, as I would like to maintain it with one htaccess in root and one in the redirect project folder.