apache - Deprecation of PATH_INFO .htaccess rule broken -
recently hosting provider has been updating apache systems 2.4.4. in doing has caused expression engine site break because need force query strings site running.
from understand can fix issue updating line in .htaccess rule ...
rewriterule ^(.*)$ /index.php?/$1 [l] unfortunately fix not simple this.
my website uses custom expression engine plugin detect region of world in using ip nation module. happens if united states see site content & if anywhere else appends "international" first part of uri display international content based on first part of our uri
for example
http://www.example.com/segment_1/segment_2/segment_2 = site http://www.example.com/international/segment_1/segment_2/segment_2 = international site when try add query string rewriterule index.php breaks international site , i'm not sure why.
rewritecond $1 !\.(gif|jpe?g|png)$ [nc] rewritecond %{request_filename} !-f rewritecond %{request_filename} !-d rewriterule ^(.*)$ /index.php/$1 [l] rewriterule /international/(.*)$ /index.php/$1 [l] adding "?" rewriterule ^(.*)$ /index.php?/$1 [l] fixes site breaks international site saying can't find international page.
adding "?" rewriterule /international/(.*)$ /index.php?/$1 [l] fixes international site site not work because needs query string.
and adding them both not work either.
i'm missing within .htaccess overcome issue can't seem generate correct syntax.
any ideas?
i'm going take wild guess here, useless...
rewritecond $1 !\.(gif|jpe?g|png)$ [nc] rewritecond %{request_filename} !-f rewritecond %{request_filename} !-d rewriterule ^(.*)$ /index.php/$1 [l] rewriterule /international/(.*)$ /index.php/$1 [l] the problem looks rewrite url adding in index.php?, add in again international - hence when add "?" both, kills rewrite.
so first rewrite need exclude international, , second ensure it's effecting international.
rewritecond $1 !\.(gif|jpe?g|png)$ [nc] rewritecond %{request_filename} !-f rewritecond %{request_filename} !-d rewritecond %{request_uri} !(international) rewriterule ^(.*)$ /index.php?/$1 [l] rewritecond %{request_uri} (international) rewriterule /international/(.*)$ /index.php?/$1 [l] you may need repeat 3 initial conditions second part.
update
this got working in end (thanks pointing me in right direction - luke)
rewritecond $1 !\.(gif|jpe?g|png)$ [nc] rewritecond %{request_filename} !-f rewritecond %{request_filename} !-d rewritecond %{request_uri} !(international) rewriterule ^(.*)$ /index.php?/$1 [l] rewritecond $1 !\.(gif|jpe?g|png)$ [nc] rewritecond %{request_filename} !-f rewritecond %{request_filename} !-d rewritecond %{request_uri} (international) rewriterule ^(.*)$ /index.php/$1 [l] rewriterule /international/(.*)$ /index.php?/$1 [l]
Comments
Post a Comment