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,完成。

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