2010-08-23 13:52

利用 Apache .htaccess 修改 PHP 系統設定

RewriteEngine on
RewriteRule ^.*$ index.php #將所有請求轉至 index.php

#除特定檔案的請求以外的轉至 index.php
#RewriteRule !\.(js|ico|gif|jpg|png|css)$ index.php 

php_flag register_globals off #將傳入參數註冊為全域變數
php_flag magic_quotes_gpc off #對特殊字元加上的反斜線
php_flag display_error off    #在網頁上顯示錯誤訊息
php_flag output_buffering on  #開啟輸出緩衝
php_flag log_error on         #紀錄錯誤訊息
php_flag allow_url_fopen off  #fopen 可開啟遠端網頁
php_flag expose_php off       #顯示PHP 版本資訊
php_flag safe_mode on         #安全模式

php_value include_path "/path/to/lib" #自訂函數庫的位址


參考網址:
php_flag + php_value + Apache 在不更改 php.ini 的情況下更改預設值
Apache之AllowOverride參數詳解

2 回應:

匿名 提到...

Hello! Can you tell me how i can register mail at google [url=http://google.com]google[/url] http://google.com

Jax Hu 提到...

https://mail.google.com/mail