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.
No they were put there because there was a problem with the forward / slash
What did you Try? What did you Get? What did you Expect?
Joined CodeIgniter Community 2009. ( Skype: insitfx )
The CodeIgniter 4 Developers, if I remember eight they added that when I was having trouble with
the forward slash on my Windows 10 Pro x64 which fixed the problem. What did you Try? What did you Get? What did you Expect?
Joined CodeIgniter Community 2009. ( Skype: insitfx )
(12-10-2020, 02:29 PM)InsiteFX Wrote: The CodeIgniter 4 Developers, if I remember eight they added that when I was having trouble with This doesn't clarify your prior statment where you said "they were put there." They in that context could not possibly be referring to the Codeigniter devs. Please explain what you meant.
The CodeIgniter Developer's put them in there.
What did you Try? What did you Get? What did you Expect?
Joined CodeIgniter Community 2009. ( Skype: insitfx )
What don't you understand the CodeIgniter Development Team added that ([\s\S]) to the .htaccess file.
What did you Try? What did you Get? What did you Expect?
Joined CodeIgniter Community 2009. ( Skype: insitfx )
|
Welcome Guest, Not a member yet? Register Sign In |