在Bluehost上运行Django时,子页面没有正确重定向

时间:2014-05-14 20:16:15

标签: python django .htaccess fastcgi bluehost

我们正在为Bluehost上的Django应用程序设置测试环境并遇到问题。

主页加载正常,但点击任何链接都找不到合适的页面(这在Heroku上的localhost和生产环境中运行正常)。

.htaccess文件

AddHandler fcgid-script .fcgi
RewriteRule
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^$ /home2/naturbh2/public_html/dev/agile-atoll-6289/spicestore/SnapEDA.fcgi [QSA,L]
Options -Indexes

.fcgi文件

#!/home2/naturbh2/python27/bin/python2.7
import sys, os
from django.core.handlers.wsgi import WSGIHandler

# Add a custom Python path.
sys.path.insert(0, "/home2/naturbh2/public_html/dev/agile-atoll-6289")
sys.path.insert(0, "/home2/naturbh2/public_html/dev/agile-atoll-6289/spicestore")
sys.path.insert(0, "/home2/naturbh2/public_html/dev/agile-atoll-6289/spicestore/apps")
sys.path.insert(0, "/home2/naturbh2/python27")

#print sys.path

os.environ['DJANGO_SETTINGS_MODULE'] = 'spicestore.settings'
from django.core.servers.fastcgi import runfastcgi
runfastcgi(method="threaded", daemonize="false")

0 个答案:

没有答案