Apache2.4.6配置rewrite

操作均对主文件:httpd.conf进行

1.在Include conf.modules.d/*.conf 后面加

Include conf.modules.d/*.conf
LoadModule rewrite_module modules/mod_rewrite.so

2.将AllowOverride 改为all

Options Indexes FollowSymLinks
    #
    # AllowOverride controls what directives may be placed in .htaccess files.
    # It can be "All", "None", or any combination of the keywords:
    #   Options FileInfo AuthConfig Limit
    #
    AllowOverride all
    #AllowOverride None

3.在结尾加

<VirtualHost *:80>
ServerAdmin 156060944@qq.com                
DocumentRoot "/var/www/17lottery/public"   
ServerName lot.9xzb.com                  
DirectoryIndex index.php index.html index.htm    
ErrorLog "logs/lot_9xzb-error_log"
CustomLog "logs/lot_9xzb-access_log" common
</VirtualHost>

4.重启Apache   systemctl restart httpd    或  service httpd restart 都行

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值