2
I am developing a php microframwork, and I am using the built-in php server (php -S 127.0.0.1:8000 -t public) with root directory in the public folder/.
I don’t know if . htaccess works or is working on this server.
It happens that when accessing a non-root path ("/") such as "/properties", the path of CSS files, images and the like are overlapping the path, such as: "/properties/ext/css/...", where the normal should be: "/ext/css/...".
Accessing the route "/properties" (WORKING CORRECTLY):
[Sat Nov 17 20:35:12 2018] ::1:34630 [200]: /propriedades
[Sat Nov 17 20:35:12 2018] ::1:34634 [200]: /ext/css/core.css
[Sat Nov 17 20:35:12 2018] ::1:34636 [200]: /img/logo02.svg
[Sat Nov 17 20:35:12 2018] ::1:34638 [200]: /img/default-image.png
Accessing the route "/properties/" (PROBLEM):
[Sat Nov 17 20:35:10 2018] ::1:34620 [200]: /propriedades/
[Sat Nov 17 20:35:10 2018] ::1:34622 [404]: /propriedades/ext/css/core.css - No such file or directory
[Sat Nov 17 20:35:10 2018] ::1:34626 [404]: /propriedades/ext/js/core.js - No such file or directory
[Sat Nov 17 20:35:11 2018] ::1:34628 [404]: /propriedades/ext/js/core.js - No such file or directory
Routes are captured and handled by the route class of the system. Below follows the file . htaccess:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule ^(.*)/$ /$1 [L,R=301]
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [L]
</IfModule>
Can someone at least give me some idea of what I should try to solve?
Problem solved by following your reply!! Thank you very much friend!
– Lucas Fonseca dos Santos