我有一個建立在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的重寫工作,所以我假設如此。 –