Apache2的网站将不能更改默认的网址时,整个网站

Apache2的网站将不能更改默认的网址时,整个网站

问题描述:

好日子Apache2的网站将不能更改默认的网址时,整个网站

浏览我最近我安装Linux上的新的网络服务器具有典型的灯系统。我使用PhPBB作为我的网站的基础。

一切都在线并可从网络外部访问。

唯一的问题:该URL永远不会从www.gaymerscommunity.com更改。您可以浏览整个测试论坛,注册部分或网站的任何其他部分,并且始终保持相同的URL,no/index/forums/register或其他任何内容。始终只是基本网址。

我启用了a2enmod重写,并且我允许覆盖apache2.conf中的所有目录;我还很早就更改了/ etc/hosts文件以包含'127.0.0.1 gaymerscommunity.com'。

其他一切都很默认。

我真的很希望论坛上的每个帖子都有一个独特的网址,或者至少每个论坛都有一个我可以用来引导用户访问相应内容的网址。

我应该从哪里开始?

我在我的文件夹的根目录中有一个.htaccess文件,但是我从某人那里得到了它,这是他们的PhPBB默认.htaccess文件。所以,我只是复制它,并启用重写。

<IfModule mod_rewrite.c> 
RewriteEngine on 

# 
# Uncomment the statement below if you want to make use of 
# HTTP authentication and it does not already work. 
# This could be required if you are for example using PHP via Apache CGI. 
# 
#RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization},L] 

# 
# The following 3 lines will rewrite URLs passed through the front controller 
# to not require app.php in the actual URL. In other words, a controller is 
# by default accessed at /app.php/my/controller, but can also be accessed at 
# /my/controller 
# 
RewriteCond %{REQUEST_FILENAME} !-f 
RewriteCond %{REQUEST_FILENAME} !-d 
RewriteRule ^(.*)$ app.php [QSA,L] 

# 
# If symbolic links are not already being followed, 
# uncomment the line below. 
# http://anothersysadmin.wordpress.com/2008/06/10/mod_rewrite-forbidden-403-with-apache-228/ 
# 
#Options +FollowSymLinks 
</IfModule> 
<IfModule mod_version.c> 
<IfVersion < 2.4> 
    <Files "config.php"> 
     Order Allow,Deny 
     Deny from All 
    </Files> 
    <Files "common.php"> 
     Order Allow,Deny 
     Deny from All 
    </Files> 
</IfVersion> 
<IfVersion >= 2.4> 
    <Files "config.php"> 
     Require all denied 
    </Files> 
    <Files "common.php"> 
     Require all denied 
    </Files> 
</IfVersion> 
</IfModule> 
<IfModule !mod_version.c> 
<IfModule !mod_authz_core.c> 
    <Files "config.php"> 
     Order Allow,Deny 
     Deny from All 
    </Files> 
    <Files "common.php"> 
     Order Allow,Deny 
     Deny from All 
    </Files> 
</IfModule> 
<IfModule mod_authz_core.c> 
    <Files "config.php"> 
     Require all denied 
    </Files> 
    <Files "common.php"> 
     Require all denied 
    </Files> 
</IfModule> 
</IfModule> 
+0

您在本网站的根目录下是否有正确的.htaccess文件? – Imdad

+0

我在根目录下有一个.htaccess,但我不确定它是否正确安装。我发现另一个用户说这是他的默认设置,我将其复制为我自己的。 – Pinkphoenix

+0

我在原始文章中包含.htaccess文件。 – Pinkphoenix

固定

原来这不是什么与我自己的服务器设置,至少不会在我的服务器端。我点击了网站上的链接,并选择“在新标签页中打开”。看哪,有一个新的URL地址。唯一的问题......它被列为http:///论坛。

所以,我去了我的域名提供商。我最近与他们联系,询问他们如何设置这一切,他们配置域转发到我的公共IP地址。事实证明这是错误的。

请勿将您的域名转发到公有IP地址。相反,编辑您的DNS'A型'列表名称'@'指向您的公共IP地址。

您知道得越多=)