QQ 再請教一個網址的問題

XAMPP Running Discuss
關於 XAMPP 架設使用操作討論,非本程式相關問題一律砍文!

版主: 版主管理群

回覆文章
beermilktea
星球普通子民
星球普通子民
文章: 7
註冊時間: 2005-04-10 03:57

QQ 再請教一個網址的問題

文章 beermilktea »

各位大大安

我把noip設好了 外部也連的進來
但是連到我的網址時
都會轉到http://xxx.xxx.xxx/xampp/下

但是我在放在htdocs的phpbb資料夾的名稱是xxxx

請問要改哪兒才會按我的網址後直接導向xxxx的資料夾呢

還是我放諎了 是不是應該要永在htdocs/xampp /底下呢...

謝謝各位大大解答
chiouss
竹貓忠實會員
竹貓忠實會員
文章: 1741
註冊時間: 2002-11-29 18:19

文章 chiouss »

httpd.conf 裡面的 DocumentRoot 還有後面有關權限的地方 (反正用搜尋->取代改掉就對了)
beermilktea
星球普通子民
星球普通子民
文章: 7
註冊時間: 2005-04-10 03:57

文章 beermilktea »

請問一下是改
DocumentRoot "C:/Program Files/xampp/htdocs/"

<Directory "C:/Program Files/xampp/htdocs/">
這個嗎

再後面的就小難懂了 >w<
chiouss
竹貓忠實會員
竹貓忠實會員
文章: 1741
註冊時間: 2002-11-29 18:19

文章 chiouss »

等等,你是說你連你的 URL 會被自動導到 xampp 這個目錄底下?
ex. http://localhost/ -> http://localhost/xampp/ 這樣?
如果是的話,去看看你的 DocumentRoot 裡面有沒有 index.html/index.php,裡面寫些什麼。

當然,如果你的站只有 phpbb,那你就把 DocumentRoot 直接改掉也沒關係啦! :Q

--
我是習慣把預設的 DocumentRoot 改掉,這樣就不用理裡面擺了什麼東西、會把我導到哪裡去 :Q
beermilktea
星球普通子民
星球普通子民
文章: 7
註冊時間: 2005-04-10 03:57

文章 beermilktea »

不好意思喔~ 我太嫩
我節錄了一些文字下來
麻煩您幫我看一下謝謝

# ServerName gives the name and port that the server uses to identify itself.
# This can often be determined automatically, but we recommend you specify
# it explicitly to prevent problems during startup.
#
# If your host doesn't have a registered DNS name, enter its IP address here.
#
ServerName elves.sytes.net

#
# DocumentRoot: The directory out of which you will serve your
# documents. By default, all requests are taken from this directory, but
# symbolic links and aliases may be used to point to other locations.
#
DocumentRoot "C:/Program Files/xampp/htdocs/"
#
# Each directory to which Apache has access can be configured with respect
# to which services and features are allowed and/or disabled in that
# directory (and its subdirectories).
#
# First, we configure the "default" to be a very restrictive set of
# features.
#
<Directory />
Options FollowSymLinks
AllowOverride None
Order deny,allow
Deny from all
</Directory>

#
# Note that from this point forward you must specifically allow
# particular features to be enabled - so if something's not working as
# you might expect, make sure that you have specifically enabled it
# below.
#

#
# This should be changed to whatever you set DocumentRoot to.
#
<Directory "C:/Program Files/xampp/htdocs/">
#
# Possible values for the Options directive are "None", "All",
# or any combination of:
# Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
#
# Note that "MultiViews" must be named *explicitly* --- "Options All"
# doesn't give it to you.
#
# The Options directive is both complicated and important. Please see
# http://httpd.apache.org/docs/2.2/mod/core.html#options
# for more information.
#
Options Indexes FollowSymLinks Includes ExecCGI
chiouss
竹貓忠實會員
竹貓忠實會員
文章: 1741
註冊時間: 2002-11-29 18:19

文章 chiouss »

beermilktea 寫:不好意思喔~ 我太嫩
我節錄了一些文字下來
麻煩您幫我看一下謝謝
你給我看的是 httpd.conf,我要看的是你 XAMPP\htdocs 裡面有沒有 index.html 或是 index.php 這類的東西...冏
beermilktea
星球普通子民
星球普通子民
文章: 7
註冊時間: 2005-04-10 03:57

文章 beermilktea »

是的
二個都有

請問應該怎摸做呢

index.php裡是寫
<?php
if (!empty($_SERVER['HTTPS']) && ('on' == $_SERVER['HTTPS'])) {
$uri = 'https://';
} else {
$uri = 'http://';
}
$uri .= $_SERVER['HTTP_HOST'];
header('Location: '.$uri.'/xampp/');
exit;
?>
Something is wrong with the XAMPP installation :-(


index.html是寫

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title></title>
</head>
<body>
<h1>It works!</h1>
</body>
</html>
chiouss
竹貓忠實會員
竹貓忠實會員
文章: 1741
註冊時間: 2002-11-29 18:19

文章 chiouss »

beermilktea 寫:是的
二個都有

請問應該怎摸做呢

index.php裡是寫

代碼: 選擇全部

<?php
	if (!empty($_SERVER['HTTPS']) && ('on' == $_SERVER['HTTPS'])) {
		$uri = 'https://';
	} else {
		$uri = 'http://';
	}
	$uri .= $_SERVER['HTTP_HOST'];
	header('Location: '.$uri.'/xampp/');
	exit;
?>
把 header 後面那個 /xampp/ 改掉,然後把 index.html 丟到垃圾桶 :Q
回覆文章

回到「XAMPP」