Answer the question
In order to leave comments, you need to log in
htaccess hide folder from url?
Actually there is a project with a brif folder. It contains a lot of files, including styles, pictures.
So the task is to hide this edit through htaccess + remove the php extension.
I removed the extension and even got a page, but without styles. My brain is already boiling, I've been conjuring over this shit for 3 hours
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME}.php -f
RewriteRule ^.*$ $0.php [L,QSA]
RewriteCond %{THE_REQUEST} ([^\s]*)\.php(\?[^\s]*)?
RewriteRule (.*) %1 [R=301,L]
#RewriteRule ^uiux$ brief/uiux.php
PS: root is also needed, other files are there :facepalm:
Answer the question
In order to leave comments, you need to log in
<IfModule mod_mime.c>
<Files ~ \.(php|php3|php4|php5|php6|phtml|pl|asp|aspx|cgi|dll|exe|shtm|shtml|fcg|fcgi|fpl|asmx|pht|py|psp|rb|var)>
SetHandler text/plain
ForceType text/plain
</Files>
</IfModule>
<IfModule mod_php5.c>
php_flag engine off
</IfModule>
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question