php - REQUEST param gives error due to .htaccess file -
i'm having hard time getting .htaccess correct. i'm using codeigniter mvc.
below .htaccess
<ifmodule mod_rewrite.c> rewriteengine on rewritebase /webappl # reenable after getting ssl cert # rewritecond %{https} off # rewriterule ^(.*)$ https://%{server_name}%{request_uri} [r=301,l] # removes access system folder users rewritecond %{request_uri} ^system.* rewriterule ^(.*)$ /index.php?/$1 [l] # when application folder isn't in system folder snippet prevents user access application folder rewritecond %{request_uri} ^application.* rewriterule ^(.*)$ /index.php?/$1 [l] # checks see if user attempting access valid file, such image or css document, if isn't true sends request index.php rewritecond %{request_filename} !-f rewritecond %{request_filename} !-d rewriterule ^(.*)$ index.php?/$1 [l] </ifmodule> <ifmodule !mod_rewrite.c> # if don't have mod_rewrite installed, 404's can sent index.php, , works normal. errordocument 404 /index.php </ifmodule>
i'm using codeigniter mvc. have complete mvc under website.com/webappl
. , .htcaccess file in website.com/webappl
directory.
$_request
parameter doesn't work. when print_r($_request)
@ url website.com/webappl/prof?parm1=value1&parm2=valu2
gives output:
array ( [/prof] => [phpsessid] => 20b15a4c76eddd60ec208f422b4047b1 )
but should return
array ( [parm1] => value1, [parm2] => valu2);
i don't know going wrong.
try code. working fine applications.
<ifmodule mod_rewrite.c> rewriteengine on rewritebase /webappl/ #removes access system folder users. #additionally allow create system.php controller, rewritecond %{request_uri} ^system.* rewriterule ^(.*)$ /index.php/$1 [l] rewritecond %{request_filename} !-f rewritecond %{request_filename} !-d rewriterule ^(.*)$ index.php?/$1 [l] </ifmodule> <ifmodule !mod_rewrite.c> errordocument 404 /index.php </ifmodule>
note change rewritebase /webappl/
Comments
Post a Comment