簡潔網址 + 虛擬主機

1 篇文章 / 0 new
author
簡潔網址 + 虛擬主機

當系統安裝在子目錄下要啟用簡潔網址功能且使用 apache 虛擬主機時, 須注意 httpd-vhosts.conf 內 子目錄路徑 設定

<VirtualHost *:80>
    ServerAdmin shioulo.hsu@msa.hinet.net
    ServerName shioulo.no-ip.com
    DocumentRoot "c:\Serv\www\cms"
    ErrorLog "logs/shioulo.no-ip.com-error_log"
    CustomLog "logs/shioulo.no-ip.com-access_log" common
    <Directory "C:\Serv\www\cms">
      RewriteEngine on
      RewriteBase /cms
      RewriteCond %{REQUEST_FILENAME} !-f
      RewriteCond %{REQUEST_FILENAME} !-d
      RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]

        Options -Indexes -FollowSymLinks
        AllowOverride All
        Order allow,deny
        Allow from all
    </Directory>
</VirtualHost>

 

Free Web Hosting