linux – .htaccess无效(mod_rewrite)
发布时间:2021-05-16 19:44:09  所属栏目:Linux  来源:网络整理 
            导读:副标题#e# 编辑:我很确定我的.htaccess文件没有被执行,问题不在于我的重写规则. 我没有运气,因为mod_rewrite正在运行我的.htaccess.基本上我所要做的就是从“http://www.site.com”和“https://www.site.com”中删除“www”. 如果有什么我遗失的(conf文件
                
                
                
            | 我在apache上的www的默认配置文件 NameVirtualHost *:80
<VirtualHost *:80>
    ServerAdmin info@site.com
    #SSLEnable
    #SSLVerifyClient none
    #SSLCertificateFile /usr/local/ssl/crt/public.crt  
    #SSLCertificateKeyFile /usr/local/ssl/private/private.key  
    DocumentRoot /var/www/site/trunk/html
    <Directory />
        Options FollowSymLinks
        AllowOverride all
    </Directory>
    <Directory /var/www/site/trunk/html>
        Options Indexes FollowSymLinks MultiViews
        AllowOverride all
        Order allow,deny
        allow from all
    </Directory>
    ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
    <Directory "/usr/lib/cgi-bin">
        AllowOverride None
        Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
        Order allow,deny
        Allow from all
    </Directory>
    ErrorLog /var/log/apache2/error.log
    # Possible values include: debug,emerg.
    LogLevel warn
    CustomLog /var/log/apache2/access.log combined
    ServerSignature On
    Alias /doc/ "/usr/share/doc/"
    <Directory "/usr/share/doc/">
        Options Indexes MultiViews FollowSymLinks
        AllowOverride None
        Order deny,allow
        Deny from all
        Allow from 127.0.0.0/255.0.0.0 ::1/128
    </Directory>
</VirtualHost>(编辑:锡盟站长网) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! | 
站长推荐
            
        

