mistake in default .htaccess file? |
I'm looking at the default htaccess file distributed with CI4 and it looks to me like there's a mistake in the .htaccess rule:
Code: # Checks to see if the user is attempting to access a valid file, If I'm not mistaken, that \s\S in square brackets should match whitespace characters. Shouldn't that last line be this? Code: RewriteRule ^(.*)$ index.php/$1 [L,NC,QSA][/code] EDIT: I see from the apache docs and the perl docs that [\s\S]* should match zero or more white space and non-whitespace characters. I was having problems with this RewriteRule because I was trying to put it in my apache conf file (for better performance than .htaccess) but I was getting Bad Request responses. I solved the problem by putting a / before the index.php like so: Code: RewriteRule ^([\s\S]*)$ /index.php/$1 [L,NC,QSA] Seems to be working now. Hope this helps someone else. |
Messages In This Thread |
mistake in default .htaccess file? - by sneakyimp - 12-09-2020, 04:04 PM
RE: mistake in default .htaccess file? - by InsiteFX - 12-09-2020, 09:48 PM
RE: mistake in default .htaccess file? - by sneakyimp - 12-10-2020, 12:37 PM
RE: mistake in default .htaccess file? - by InsiteFX - 12-10-2020, 02:29 PM
RE: mistake in default .htaccess file? - by sneakyimp - 12-10-2020, 03:50 PM
RE: mistake in default .htaccess file? - by InsiteFX - 12-10-2020, 09:37 PM
RE: mistake in default .htaccess file? - by sneakyimp - 12-11-2020, 11:42 AM
RE: mistake in default .htaccess file? - by InsiteFX - 12-11-2020, 12:59 PM
RE: mistake in default .htaccess file? - by paulbalandan - 12-12-2020, 01:24 PM
|