我已经在我的私人服务器上完成了SocialEngine PHP的全新安装。
我现在还需要安装Moodle,并通过以下方式访问它:
http://www.example.com/moodle
SocialEngine会创建自己的.htaccess文件,所以每次我尝试访问moodle目录时,都会得到一个"Page Not file .您试图访问的页面无法找到“的提示。因为重定向迫使它在SocialEngine插件中搜索moodle,而我希望它重定向到/httpdocs中的/moodle/目录。
我是一个非常新手与.htaccess选项,我需要一个提示,我可以做什么。
.htaccess的内容如下:
<IfModule mod_rewrite.c>
Options +FollowSymLinks
RewriteEngine On
# Get rid of index.php
RewriteCond %{REQUEST_URI} /index\.php
RewriteRule (.*) index.php?rewrite=2 [L,QSA]
# Rewrite all directory-looking urls
RewriteCond %{REQUEST_URI} /$
RewriteRule (.*) index.php?rewrite=1 [L,QSA]
# Try to route missing files
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} public\/ [OR]
RewriteCond %{REQUEST_FILENAME} \.(jpg|gif|png|ico|flv|htm|html|php|css|js)$
RewriteRule . - [L]
# If the file doesn't exist, rewrite to index
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?rewrite=1 [L,QSA]
</IfModule>
# sends requests /index.php/path/to/module/ to "index.php"
# AcceptPathInfo On
# @todo This may not be effective in some cases
FileETag Size有什么建议或建议吗?
非常感谢您的提前!
致以问候。
发布于 2011-10-27 01:21:07
每次重写时,我都会排除moodle文件夹,并检查它是否正常工作。在它工作后,我会在你并不真正需要它的每条规则中删除它。
<IfModule mod_rewrite.c>
Options +FollowSymLinks
RewriteEngine On
# Get rid of index.php
RewriteCond %{REQUEST_URI} !^/moodle
RewriteCond %{REQUEST_URI} /index\.php
RewriteRule (.*) index.php?rewrite=2 [L,QSA]
# Rewrite all directory-looking urls
RewriteCond %{REQUEST_URI} !^/moodle
RewriteCond %{REQUEST_URI} /$
RewriteRule (.*) index.php?rewrite=1 [L,QSA]
# Try to route missing files
RewriteCond %{REQUEST_URI} !^/moodle
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} public\/ [OR]
RewriteCond %{REQUEST_FILENAME} \.(jpg|gif|png|ico|flv|htm|html|php|css|js)$
RewriteRule . - [L]
# If the file doesn't exist, rewrite to index
RewriteCond %{REQUEST_URI} !^/moodle
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?rewrite=1 [L,QSA]
</IfModule>
# sends requests /index.php/path/to/module/ to "index.php"
# AcceptPathInfo On
# @todo This may not be effective in some cases
FileETag Sizehttps://stackoverflow.com/questions/7905417
复制相似问题