我正在尝试在我的网络主机上安装friendica(hourb,类似于000webhost,但使用ssh)。
我将它安装到目录/子域 imoppen.domain.com (domain.com/imoppen)
但它说:.htaccess 中的 URL 重写不起作用。检查您的服务器配置。我无法继续安装。
我认为这与目录的 rewritebase 部分有关,但我不知道如何修复它。
它还在 php 中给出了一个错误,但这对我来说并不是什么大问题;
Warning: set_time_limit() has been disabled for security reasons in /home/username/public_html/imoppen/boot.php on line 290
我的第一个 .htaccess (domain.com) 包含:
# DO NOT REMOVE THIS LINE AND THE LINES BELOW ERRORPAGEID:yLaNyW
ErrorDocument 404 /404.html
# DO NOT REMOVE THIS LINE AND THE LINES ABOVE yLaNyW:ERRORPAGEID
RewriteBase /
我的第二个 .htaccess (domain.com/installationdirectory) 包含:
Options -Indexes
AddType application/x-java-archive .jar
AddType audio/ogg .oga
<FilesMatch "\.(out|log)$">
Deny from all
</FilesMatch>
SetEnv PHP_VER 5_3
<IfModule mod_rewrite.c>
RewriteEngine on
# Protect repository directory from browsing
RewriteRule "(^|/)\.git" - [F]
# Rewrite current-style URLs of the form 'index.php?q=x'.
# Also place auth information into REMOTE_USER for sites running
# in CGI mode.
# If you have troubles or use VirtualDocumentRoot
# uncomment this and set it to the path where your friendica installation is
# i.e.:
# Friendica url: http://some.example.com
# RewriteBase /
# Friendica url: http://some.example.com/friendica
# RewriteBase /imoppen/
#
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?q=$1 [E=REMOTE_USER:%{HTTP:Authorization},L,QSA]
</IfModule>
如您所见,我尝试使用 rewritebase 部分,但不幸的是它不起作用。我的整体 php 版本设置为 5.3