在Ubuntu上创建的子域中,CSS,JS和图像未使用codeigniter加载。
https://fmbhq.duckdns.org/user/login
https://fmbhq.duckdns.org也被重定向到https://www.www.fmbhq.duckdns.org/fmbhq/index.php/fmbhq/index.php/
css文件未加载https://fmbhq.duckdns.org/assets/css/font.css
我的文件位于/ var / www / html / fmbhq
我在fmbhq文件夹中的.htaccess是
RewriteEngine on
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond $1 !^(index\.php|robots\.txt)
RewriteRule ^(.*)$ index.php?/$1 [L]
/ etc / apache2 / sites-available下的我的conf文件是
<VirtualHost *:80>
ServerAdmin support@weconnectdirect.com
ServerName fmbhq.duckdns.org
DocumentRoot /var/www/html/fmbhq/index.php
# Available loglevels: trace8, ..., trace1, debug, info, notice, warn,
# error, crit, alert, emerg.
# It is also possible to configure the loglevel for particular
# modules, e.g.
#LogLevel info ssl:warn
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
# For most configuration files from conf-available/, which are
# enabled or disabled at a global level, it is possible to
# include a line for only one particular virtual host. For example the
# following line enables the CGI configuration for this host only
# after it has been globally disabled with "a2disconf".
#Include conf-available/serve-cgi-bin.conf
RewriteEngine on
RewriteCond %{SERVER_NAME} =www.fmbhq.duckdns.org [OR]
RewriteCond %{SERVER_NAME} =fmbhq.duckdns.org
RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]
</VirtualHost>
请帮助 谢谢
答案 0 :(得分:0)
如果文件位于/var/www/html/fmbhq
,则conf文件中的DocumentRoot错误。应该是DocumentRoot /var/www/html/fmbhq