.htaccess的codeigniter问题 [英] Htaccess Codeigniter problem
问题描述
在我的项目使用codeigniter框架中使用一个htaccess
的DirectoryIndex的index.php
RewriteEngine叙述上
的RewriteCond $ l ^!(指数\ .PHP |资产|机器人\ .TXT |图标\ .ICO)[NC]
的RewriteCond%{} REQUEST_FILENAME!-f [NC]
的RewriteCond%{} REQUEST_FILENAME!-d [NC]
重写规则^(。*)$ ./index.php/$1 [NC,L,QSA]
我的问题是,当我叫贝宝服务,贝宝响应我的GET URL,这样的: <一href="http://xxx.xx.com/myproject/paypalCallback?tx=32J30607S6157364F&st=Pending&amt=85.00&cc=SGD&cm=&item_number=" rel="nofollow">http://xxx.xx.com/myproject/paypalCallback?tx=32J30607S6157364F&st=Pending&amt=85.00&cc=SGD&cm=&item_number=
找不到我收到一个404页。 .htaccess中不接受GET网址:TX = 32J30607S6 ... 我确信它是在本地工作,但不能在现场侧
如果可以,请帮助我。 谢谢
是这部作品在CI
您仍然可以访问查询字符串,如果他们是禁用CI,试试这个code
要从URL删除的index.php
RewriteEngine叙述上
的RewriteCond%{REQUEST_URI} ^系统。*
重写规则^(。*)$ /index.php/$1 [L]
的RewriteCond%{} REQUEST_FILENAME!-f
的RewriteCond%{} REQUEST_FILENAME!-d
重写规则^(。*)$的index.php / $ 1 [L]
如果您在子目录CI应用程序使用此
的RewriteBase / F2F / f2fweb
I used an htaccess in my project that use Codeigniter framework:
DirectoryIndex index.php
RewriteEngine on
RewriteCond $1 !^(index\.php|assets|robots\.txt|favicon\.ico) [NC]
RewriteCond %{REQUEST_FILENAME} !-f [NC]
RewriteCond %{REQUEST_FILENAME} !-d [NC]
RewriteRule ^(.*)$ ./index.php/$1 [NC,L,QSA]
My problem is, when i call a paypal service, Paypal response for me an GET url, like that: http://xxx.xx.com/myproject/paypalCallback?tx=32J30607S6157364F&st=Pending&amt=85.00&cc=SGD&cm=&item_number=
I receive a 404 page not found. Htaccess doesn't accept GET URL: ?tx=32J30607S6... I sure it's work on local, but not on live side
If you can, please help me. Thanks
yes this works in CI
you can still access query string if they are disable in CI, try this code
To remove index.php from URL
RewriteEngine On
RewriteCond %{REQUEST_URI} ^system.*
RewriteRule ^(.*)$ /index.php/$1 [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L]
if you have CI app in sub directories use this
RewriteBase /f2f/f2fweb
这篇关于.htaccess的codeigniter问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!