.htaccess打破了我的网站

时间:2017-02-11 15:24:26

标签: regex apache mod-rewrite ubuntu-16.04

我有Ubuntu Server 16.0.4,apache 2.4.25和PHP 5.6

低于我的 .htaccess 行代码:

RewriteEngine on
RewriteCond $1 !^(index\.php|images|public|assets|uploads|themes|install|updates|asset|mob|robots\.txt)
RewriteRule ^(.*)$ index.php?/$1 [QSA,L]
<FilesMatch "\.(jpg|jpeg|png|gif|swf|css)$">
    Header set Cache-Control "max-age=604800, public"
</FilesMatch>

我想知道为什么我的网站在创建file.htaccess时空白,我的.htaccess有什么问题?

低于我的apache虚拟主机配置:

<VirtualHost *:80>
        <Directory /var/www/html/>
               Options Indexes FollowSymLinks MultiViews
                AllowOverride All
                Order allow,deny
                allow from all
         </Directory>
ServerAdmin webmaster@localhost
DocumentRoot /var/www/html
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
AccessFileName .htaccess
<FilesMatch "^\.ht">
Deny from all
Satisfy All
</FilesMatch>
<VirtualHost/>

0 个答案:

没有答案