apache配置symfony

-------------------------------

参考:

1、配置Web服务器

2、apache url路由配置重写

3、Apache URL重写规则(详解)

-------------------------------

按照上文1在httpd.conf添加配置,放开LoadModule rewrite_module modules/mod_rewrite.so行的注释,启用rewrite模块。

实例:

<VirtualHost *:80>
    ServerName sf.cn
    ServerAlias www.sf.cn

    DocumentRoot  E:/wamp64/www/projectName/web
    <Directory  E:/wamp64/www/projectName/web>
        AllowOverride All
        Order Allow,Deny
        Allow from All
    </Directory>

    # uncomment the following lines if you install assets as symlinks
    # or run into problems when compiling LESS/Sass/CoffeeScript assets
    # <Directory E:/wamp64/www/projectName>
    #     Options FollowSymlinks
    # </Directory>

    ErrorLog E:/wamp64/logs/project_error.log
    CustomLog E:/wamp64/logs/project_access.log combined
</VirtualHost>

重启apache,完成。

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章