Feed on
Posts
Comments
Email訂閱

先前在windows作業系統環境下,支援apache的url rewite一直是個困擾。找了一些網路上的參考資料,終於設定ok:

在apache/conf/httpd.conf 中

  1. 開啟rewrite 模組:,查找:LoadModule rewrite_module modules/mod_rewrite.so 刪除前面的”#”註釋
  2. 設定virtual host權限DocumentRoot “drive:\your host directory’\”
    ServerName yourhostnameDirectoryIndex index.html index.htm index.php index.shtml
    Options -Indexes FollowSymLinks
    AllowOverride ALL
    Order allow,deny
    Allow from all
  3. 在.htaccess 設定rewrite規則,但因windows系統檔名不能為取名.htaccess,所以要在httpd.conf中把AccessFileName .htaccess 改成 AccessFileName htaccess。也可參考這一篇存檔成.htaccess

Curl

  1. 在windows中使用 php curl。更新到最新版的php即有支援。
  2. 修改php.ini
    ;extension=php_curl.dll (取消comment 字元 ; )
  3. 複製模組相關檔案至windows system目錄
    libeay32.dll 及 ssleay32.dll

 

留言區