regex - mod_rewrite: periods from URI gone in the query string -


Problem : See examples below. When the query string (in any way) uses mod_rewrite to insert the "URI part" after the name of the script, the expiration period (.) Of each "directory" is removed

Question : Is there a way to fix this or do I have to parse REQUEST_URI?

Request ("."):

  http: //localhost/simp.fcgi/fo%2eo%2e=12 % 2e3% 2e / ba% 2eh% 2e% 2e% 2e / baz% 2e? Foo% 2e = times% 2e (always get REQUEST_URI: /simp.fcgi/fo.o.=12.3./ba.h.../baz%2e?foo%2e=bar% 2e) Regent rules ^ simp. Fcgi /(.*)$ simple.fcgi? Qs = $ 1 got QUERY_STRING: qs = fo.o. Expected QUERY_STRING: = 12.3 / ba.h / bz: qs = fo.o. = 12.3 /ba.h.../baz Or QUERY_STRING: qs = fo% 2eo% 2e = 12% 2e3% 2e / ba% 2eh% 2e% 2e% 2e / baz% 2e regrets ^ ^ simp.fcgi /(.*)$ simple.fcgi? Qs = $ 1 [northeast] found QUERY_STRING: qs = fo.o. Expected QUERY_STRING: = 12.3 / ba.h / bz: qs = fo.o. = 12.3. / Ba.h ... / baz or QUERY_STRING: qs = fo% 2eo% 2e = 12% 2e3% 2e / ba% 2eh% 2e% 2e% 2e / baz% 2e regrets ^ ^ simp.fcgi /(.*) $ Simple.fcgi? Qs = $ 1 [QSA] found QUERY_STRING: qs = fo.o. = 12.3 / BAH / falcon & amp; Amp; Foo% 2e = times% 2e expected QUERY_STRING: qs = fo.o. = 12.3. / Ba.h ... / baz. & Amp; Foo% 2e = Bar% 2e or QUERY_STRING: qs = fo% 2eo% 2e = 12% 2e3% 2e / ba% 2eh% 2e% 2e% 2e / falcon% 2e & amp; Foo% 2e = times% 2e  

request ("." Is not saved):

  http: // Localhost / simp.fcgi / fo.o. = 12.3. /ba.h.../baz.?foo.=bar (Always get REQUEST_URI: /simp.fcgi/fo.o.=12.3./ba.h.../baz%2e?foo.=bar.) Rewrite ^ simp.fcgi /(.*)$ simple.fcgi ? Qs = $ 1 [QSA] found QUERY_STRING: qs = fo.o. = 12.3 / ba.h / baz & amp; Foo = REQUIRED QUERY_STRING: qs = fo.o. = 12.3. / Ba.h ... / baz. And foo. = BarRewriteRule ^ simp.fcgi /(.*)$ simple.fcgi? Qs = $ 1 Got QUERY_STRING: qs = fo.o. Expected QUERY_STRING: = 12.3 / ba.h / bz: qs = fo.o. = 12.3. / Ba h ... / baz. RewriteRule ^ simp.fcgi /(.*)$ simple.fcgi? Qs = $ 1 [NE] found QUERY_STRING: qs = fo.o. Expected QUERY_STRING: = 12.3 / ba.h / bz: qs = fo.o. = 12.3. /ba.h.../baz    

Instead of trying to get the value from THE_REQUEST :

  rewrite% {THE_REQUEST} ^ [AZ] + \ /simp.fcgi / ([^? \] *) Rewrite ^ simp \ .fcgi / simple.fcgi? Qs =% 1 [QSA]  

Comments

Popular posts from this blog

asp.net - Javascript/DOM Why is does my form not support submit()? -

sockets - Delphi: TTcpServer, connection reset when reading -

javascript - Classic ASP "ExecuteGlobal" statement acting differently on two servers -