[Apache] CPanel & .htaccess & php.ini 應用指南
Intro CPanel的網頁伺服器是使用Apache搭建,可以支援.htaccess & php.ini的應用。 .htaccess 為Apache開啟AllowOverride後支援的檔案目錄設定檔功能,每個目錄皆能Override 以常見的轉導應用為例,.htaccess可參考以下: RewriteEngine On # 301 Redirect (Comment out) # redirect 301 / https://www.google.com # non-www redirect to www RewriteCond %{HTTP_HOST} ^yourname.com [NC] RewriteRule ^(.*)$ https://www.yourname.com/$1 [L,R=301] [Apache][.htaccess] 停用PHP – Disable PHP .htaccess file gives […]