在我的项目使用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,这样的: 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
相关推荐
最新文章