File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed
Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -815,7 +815,10 @@ local stat_blocks_used = {}
815815for statement in htaccess :gmatch (' [^\r\n ]+' ) do
816816 -- Trim leading whitespace
817817 statement = statement :gsub (" ^%s*" , " " );
818- if statement :sub (1 ,1 ) == ' <' then
818+
819+ if statement :sub (1 ,1 ) == ' #' then
820+ -- Comment, so ignore it
821+ elseif statement :sub (1 ,1 ) == ' <' then
819822 -- handle blocks
820823 if statement :sub (2 ,2 ) ~= ' /' then
821824 -- opening tag <...>
@@ -989,6 +992,7 @@ for statement in htaccess:gmatch('[^\r\n]+') do
989992 pop_ctx ()
990993 end
991994 end
995+
992996 else
993997 local instruction = statement :match (' ^[^%s]+' )
994998 if instruction then
@@ -1209,11 +1213,9 @@ if get_cdir('rewrite') and #parsed_rewriterules > 0 then
12091213 elseif flag == ' qsa' or flag == ' qsappend' then -- [QSA]
12101214 local qs = relative_uri :match (' %?.*' )
12111215 if qs then
1212- local new_qs = dst :match (' %?.*' )
1216+ local new_qs = dst :match (' %?.*' )
12131217 if new_qs then
12141218 dst = dst :gsub (' %?.*' , ' ' , 1 ).. qs .. ' &' .. new_qs :sub (2 )
1215- else
1216- dst = dst .. new_qs
12171219 end
12181220 end
12191221 elseif flag == ' qsd' or flag == ' qsdiscard' then -- [QSD]
You can’t perform that action at this time.
0 commit comments