安裝上去後又發現有一個問題咧\r
譬如說,在網址咧輸入\r
http://phpbb-tw.net/phpbb/ ←有加"/"
可以正確進入網址
若是沒有加上"/"
如:http://phpbb-tw.net/phpbb ←沒有加"/"
我的會造成網頁找不到的問題
而貓空這會自動轉成http://www.phpbb-tw.net/phpbb/
不知道這是什麼樣子的問題
請各位大大指點一下
[問題] 網址有加"/"及沒加"/"的狀況
版主: 版主管理群
版面規則
本區是討論關於 phpBB 2.0.X 架設安裝上的問題,只要有安裝任何外掛,請到外掛討論相關版面按照公告格式發表。
(發表文章請按照公告格式發表,違者砍文)
本區是討論關於 phpBB 2.0.X 架設安裝上的問題,只要有安裝任何外掛,請到外掛討論相關版面按照公告格式發表。
(發表文章請按照公告格式發表,違者砍文)
[問題] 我也有相同問題
如 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!
如 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!
先確定 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
大部份來說導向應該都會正常,或是參考 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


