?q= 參數)編輯 F:\xampp\apache\conf\httpd.conf,找到並取消註解:
LoadModule rewrite_module modules/mod_rewrite.so
於 F:\xampp\apache\conf\extra\ 新建 httpd-ubercart-5.conf:
Alias /ubercart-5 "F:/xampp/htdocs/ubercart-5/"
<Directory "F:/xampp/htdocs/ubercart-5/">
AllowOverride All
Order allow,deny
Allow from all
</Directory>
關鍵點: AllowOverride All 允許 .htaccess 覆寫重寫規則。
XAMPP 控制台重啟 Apache,或執行 xampp_restart.exe。
瀏覽器存取 https://localhost/ubercart-5/,Drupal 管理後台 admin/settings/clean-urls 應顯示「Clean URLs 測試通過」,可正常啟用。
/,即使 Windows 環境.htaccess 是否存在且包含 Drupal 標準重寫規則