最新国产好看的视频,伊人天堂AV在线,国产Aaaaaa视频,蜜臀视频在线观看一区,人妻av色图,密臀久久久精品影片,青青视频免费观看毛片,久草在线观看视,国产三级精品色情在线

開啟Apache mod_rewrite模塊示例代碼

 更新時間:2014年03月10日 17:22:14   作者:  
這篇文章主要介紹了如何開啟Apache mod_rewrite模塊,需要的朋友可以參考下
啟用mod_rewrite模塊
在conf目錄的httpd.conf文件中找到
LoadModule rewrite_module modules/mod_rewrite.so
將這一行前面的#去掉。
2.在要支持url rewirte的目錄啟用 Options FollowSymLinks和AllowOverride All
Alias /php "c:/web/php/"
復制代碼 代碼如下:

<Directory "c:/web/php/">
Options Indexes FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
</Directory>

這樣通過http://localhost:8080/php/訪問時,/php/和其下面的子目錄將支持url rewrite。

后記:php100.com
網(wǎng)上的很多文章并沒有提到要使用 Options FollowSymLinks,因為在httpd.conf中有
復制代碼 代碼如下:

<Directory />
Options FollowSymLinks
AllowOverride None
Order deny,allow
Deny from all
Satisfy all
</Directory>

這樣如果你的網(wǎng)站配置成通過http://localhost:8080/來訪問,就不會注意到Options FollowSymLinks的影響,只需要將AllowOverride None改為AllowOverride All即可。而我習慣于在本機配置成http://localhost:8080/php/,忘了加Options Indexes FollowSymLinks就成功不了,會顯示
Forbidden
You don't have permission to access /php/f2blog/ on this server.
這樣的錯誤。后來還是在apache文檔中找到了原因
Note: To enable the rewriting engine for per-directory configuration files you need to set ``RewriteEngine On'' in these files and ``Options FollowSymLinks'' must be enabled. If your administrator has disabled override of FollowSymLinks for a user's directory, then you cannot use the rewriting engine. This restriction is needed for security reasons.
實際上mod_rewrite是針對目錄的,因此并不需要將httpd.conf中的所有AllowOverride None改為AllowOverride All,Options也一樣。
BTW:看來首先是要看程序提供的文檔,但是tomcat5.0.28的文檔我?guī)缀醵伎戳耍矝]有看到說到底能不能通過service.bat在windows上安裝成功服務。倒是看到N多人和我一樣的疑問卻沒有答案,嗯,我當然知道通過tomcatxx.exe能安裝成功tomcat服務,看來只有這一條路了。

相關文章

最新評論

吉林省| 镇赉县| 巴中市| 仁化县| 白银市| 广东省| 姚安县| 自贡市| 确山县| 沛县| 云和县| 海盐县| 克什克腾旗| 镇沅| 怀仁县| 棋牌| 玉门市| 平舆县| 敖汉旗| 盐边县| 沙河市| 安阳市| 那曲县| 尚志市| 和田县| 修武县| 石河子市| 望谟县| 上林县| 安国市| 文登市| 应城市| 梁平县| 固阳县| 静乐县| 长治市| 临汾市| 疏勒县| 渭南市| 聂拉木县| 巍山|