[問題] 網址有加"/"及沒加"/"的狀況

phpBB Installation & Usage Support
phpBB 2 安裝於各類型作業平台之問題討論;外掛問題,請到相關版面依發問格式發表!
(發表文章請按照公告格式發表,違者砍文)

版主: 版主管理群

版面規則
本區是討論關於 phpBB 2.0.X 架設安裝上的問題,只要有安裝任何外掛,請到外掛討論相關版面按照公告格式發表。
(發表文章請按照公告格式發表,違者砍文)
主題已鎖定
ahdaa
星球公民
星球公民
文章: 50
註冊時間: 2004-09-13 15:00

[問題] 網址有加"/"及沒加"/"的狀況

文章 ahdaa »

安裝上去後又發現有一個問題咧\r
譬如說,在網址咧輸入\r
http://phpbb-tw.net/phpbb/ ←有加"/"
可以正確進入網址

若是沒有加上"/"
如:http://phpbb-tw.net/phpbb  ←沒有加"/"
我的會造成網頁找不到的問題
而貓空這會自動轉成http://www.phpbb-tw.net/phpbb/

不知道這是什麼樣子的問題
請各位大大指點一下
deliabest
星球公民
星球公民
文章: 73
註冊時間: 2003-05-25 16:54

文章 deliabest »

apache ===>add index.php
圖檔
網路上所有值得收藏的教學精華文章都在這裡唷!
ahdaa
星球公民
星球公民
文章: 50
註冊時間: 2004-09-13 15:00

文章 ahdaa »

deliabest 寫:apache ===>add index.php
小弟的web系統是架在linux之下
是指說在html的子目錄下加入index.php當首頁嗎??
bebe2803
星球公民
星球公民
文章: 117
註冊時間: 2005-01-24 19:31
來自: Hong Kong

文章 bebe2803 »

嗯.... 是真的 @@

因為現在人們上網也是按(已打好, 沒問題的)連結, 很少再自己打 url... 除非在 alias (當然是 httpd.conf 內) 那裡另加一個沒有 / 的...
怨念公社

phpBB 2.0.17, 8+1 個 template, 70+ mod...
ahdaa
星球公民
星球公民
文章: 50
註冊時間: 2004-09-13 15:00

文章 ahdaa »

哇~沒有用呀:-o
加上了這些咚咚
它還是自己跳到127.0.0.1
不然就是說127.0.0.1連線逾時呀

Alias /phpbb2 "/var/www/html/phpbb2/"
<Directory "/var/www/html/phpbb2/">
Options Indexes MultiViews
AllowOverride None
Order allow,deny
Allow from all
</Directory>
bebe2803
星球公民
星球公民
文章: 117
註冊時間: 2005-01-24 19:31
來自: Hong Kong

文章 bebe2803 »

你要有系統控制台的管理選項, 改網域名稱才不會跳回 127.0.0.1 或 localhost @@
怨念公社

phpBB 2.0.17, 8+1 個 template, 70+ mod...
ahdaa
星球公民
星球公民
文章: 50
註冊時間: 2004-09-13 15:00

文章 ahdaa »

bebe2803 寫:你要有系統控制台的管理選項, 改網域名稱才不會跳回 127.0.0.1 或 localhost @@
快要瘋了
網域名稱我也改過了
有"/"沒"/"

網域名稱/phpbb2或
網域名稱/phpbb2/

ip/phpbb2或
ip/phpbb2/

都試了
就是死都沒有用\r

系統程式的存放我也是\r
都試了上面的那些
進藤光
星球公民
星球公民
文章: 291
註冊時間: 2005-03-16 18:48
來自: BNW 時尚資訊網
聯繫:

文章 進藤光 »

不說你的架站環境,天曉得問題在哪?
ahdaa
星球公民
星球公民
文章: 50
註冊時間: 2004-09-13 15:00

文章 ahdaa »

進藤光 寫:不說你的架站環境,天曉得問題在哪?
謝謝您的提醒
可是小弟是不覺得因為架站環境的影響而造成這種狀況
所以才都沒有提

小弟的架站環境
Mandrake 10.1
apache是用urpmi到mirro station找來的apache2-2.0.50
它的預設目錄不像平常一樣的放在/etc/apache底下
所以,小弟也不知道它將httpd擺在哪兒
到是/etc/httpd/conf/底下亦有個httpd.conf檔
修改內容後,restart httpd
還是沒有任何改變哩
Szuzy
星球普通子民
星球普通子民
文章: 2
註冊時間: 2005-03-20 17:34

[問題] 我也有相同問題

文章 Szuzy »

http://moonyisland.com/childs/invoive 找不到\r
http://moonyisland.com/childs/invoive/ 可找到\r

IIS 無此問題,只有 Appserv 會,
我是很多網址掛在不同目錄下,如...
D:\AppServ\www\szuzy\index.php
D:\AppServ\www\childs\index.php
D:\AppServ\www\chipwalker\index.php
D:\AppServ\www\childs\invoice\index.php
...

幾年前在入口網站登錄時,有的忘記加入 '/',如...
http://moonyisland.com/childs/invoice
改成 AppServ 後,經過一段時間才發現這個問題,
結果訪客都快跑光了,還無解!
所以暫時換回 IIS!
ethan
星球公民
星球公民
文章: 218
註冊時間: 2002-06-01 09:48
聯繫:

文章 ethan »

先確定 DirectoryIndex 裡面有加入 index.php
大部份來說導向應該都會正常,或是參考 Apache FAQ

http://httpd.apache.org/docs/misc/FAQ.html
Why does accessing directories only work when I include the trailing "/" (e.g., http://foo.domain.com/~user/) but not when I omit it (e.g., http://foo.domain.com/~user)?

When you access a directory without a trailing "/", Apache needs to send what is called a redirect to the client to tell it to add the trailing slash. If it did not do so, relative URLs would not work properly. When it sends the redirect, it needs to know the name of the server so that it can include it in the redirect. There are two ways for Apache to find this out; either it can guess, or you can tell it. If your DNS is configured correctly, it can normally guess without any problems. If it is not, however, then you need to tell it.

Add a ServerName directive to the config file to tell it what the domain name of the server is.

The other thing that can occasionally cause this symptom is a misunderstanding of the Alias directive, resulting in an alias working with a trailing slash, and not without one. The Alias directive is very literal, and aliases what you tell it to. Consider the following example:

Alias /example/ /home/www/example/
The above directive creates an alias for URLs starting with /example/, but does not alias URLs starting with /example. That is to say, a URL such as http://servername.com/example/ will get the desired content, but a URL such as http://servername.com/example will result in a "file not found" error.

The following Alias, on the other hand, will work for both cases:

Alias /example /home/www/example
主題已鎖定

回到「phpBB 2 安裝與使用」