我有一个建立在codeigniter上的网站,我正试图让PP IPN与它一起工作。我查看了一些CI特定的库,但想要有一个独立的IPN文件。Codeigniter .htaccess不会忽略目录
基本上,我有CI安装在网站的根目录,我有另一个目录'pp',也在根目录。
我想使用PayPal的沙箱测试IPN,但它返回了404,我也无法直接访问该文件。
这里是我的.htaccess文件:
XSendFile on
Options -Indexes
Options +FollowSymlinks
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase/
### Canonicalize codeigniter URLs
RewriteRule ^(index(/index)?|index(\.php)?)/?$/[L,R=301]
RewriteRule ^(.*)/index/?$ $1 [L,R=301]
# Removes trailing slashes (prevents SEO duplicate content issues)
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.+)/$ $1 [L,R=301]
RewriteCond %{HTTP_HOST} !^(www) [NC]
RewriteRule ^(.*)$ http://www.mysite.net/$1 [L,R=301]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond $1 !^(index\.php|pp|robots\.txt)
RewriteRule ^(.*)$ index.php/$1 [L]
</IfModule>
<IfModule !mod_rewrite.c>
# Without mod_rewrite, route 404's to the front controller
ErrorDocument 404 /index.php
</IfModule>
在这里我们希望这件事情真的很明显!
感谢,
瑞安
非www到www的重写工作,所以我假设如此。 –