iT邦幫忙

0

網站的導向問題?

有一台後台的網址運作不太能理解
這可能是某些網路技術的功能
這台的apache設定是這樣
ServerName www.abc.com
DocumentRoot /var/www/html/ui

   <Directory /var/www/html/ui>
       Options -Indexes
       AllowOverride All
       Require all granted
       Order allow,deny
       Allow from all
   </Directory>

可是我連線www.abc.com
卻是只顯示loading,觀察chrome的console發現一堆404找不到
我一定要使用www.abc.com/ab 才可以正常連線進後台
那問題是,網址最後的ab這個位址設定到底寫在哪裡?
以我的概念設定檔寫www.abc.com 就會進入DocumentRoot這資料夾找到網頁
還是/ab這副網址的設計是寫在php內?
才一定要加/ab才可以找到網站

看更多先前的討論...收起先前的討論...
weiclin iT邦高手 4 級 ‧ 2018-03-16 19:28:18 檢舉
貼完整一點
hsiang11 iT邦好手 1 級 ‧ 2018-03-17 13:10:28 檢舉
需要什麼?
我想說這會不會是Apache的rewrite
或者是PhP的導向
也有可能是一種別名功能
weiclin iT邦高手 4 級 ‧ 2018-03-18 00:24:10 檢舉
所以設定裡都沒有 rewrite 或是 alias? .htaccess 裡面呢?
hsiang11 iT邦好手 1 級 ‧ 2018-03-19 09:58:20 檢舉
alias還真的沒有看到
.htaccess的設定

Options -Indexes

<IfModule mod_rewrite.c>
Options -Indexes

RewriteEngine On
RewriteBase /

# Force to exclude the trailing slash
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} (.*)/$
RewriteRule ^(.+)/$ api/$1 [R=307,L]

# Allow any files or directories that exist to be displayed directly
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ api/index.php?$1 [QSA,L]
</IfModule>
weiclin iT邦高手 4 級 ‧ 2018-03-19 15:28:09 檢舉
有 rewrite 那就可能是在 php 裡處理了
圖片
  直播研討會
圖片
{{ item.channelVendor }} {{ item.webinarstarted }} |
{{ formatDate(item.duration) }}
直播中

尚未有邦友回答

立即登入回答