在附加站点上安装Wordpress,重定向到主站点

时间:2017-03-14 15:22:05

标签: php mysql wordpress

我的主要网站是:

http://sandybeachit.co.uk

我的addon-domain上有一个wordpress网站设置:

[http://imadeitviral.com][1]

wordpress网站位于:

/hosting/imadeitviral

上述地址可在主要网站的sandybeachit.co.uk/hosting/imadeitviral /

下找到。

我的网站网址和主页设置为“http:// imadeitviral.com”(没有“http://和madeitviral.com”之间的空格

但是当你去imadeitviral.com网站试图加载我的主要网站在sandybeachit.co.uk,除了网站没有正确加载,你可以尝试它,你明白我的意思。

如果我设置wordpress网站网址和家指向“sandybeachit.co.uk/hosting/imadeitviral”该网站将加载正常,所以我知道我有一些错误,但我无法弄清楚是什么。 / p>

我已经尝试删除主域中的.htaccess文件并进行编辑,所以我确定这不是问题以及wordpress文件夹中的.htaccess文件。

我通过Site Software Softaculous Apps Installer进行了安装

我可以得到一些关于我做错了什么或错过了什么的指示吗?

由于

WORDPRESS目录中的HTACCESS文件:

# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /hosting/imadeitviral/
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /hosting/imadeitviral/index.php [L]
</IfModule>

# END WordPress

主要目录中的HTACCESS文件:

RewriteCond %{HTTP_HOST} ^(www\.)?imadeitviral\.com
    RewriteRule .* - [L]


RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule (.*)/$ /$1.php [L]

RewriteCond %{REQUEST_FILENAME}.php -f
RewriteRule .*[^/]$ /$0/ [L,R=301]

RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC]
RewriteRule ^(.*)$ http://%1/$1 [R=301,L]

#RULES ADDED AFTER 14TH JANUARY 2017

# Set Timezone
<IfModule !fcgid_module>
php_value date.timezone "Europe/London"
</IfModule>

# Disable directory browsing
Options All -Indexes


### Security - Disable HTTP Track and Trace
RewriteEngine on
RewriteCond %{REQUEST_METHOD} ^(TRACE|TRACK)
RewriteRule .* - [F]

# STRONG HTACCESS PROTECTION
<Files ~ "^.*\.([Hh][Tt][Aa])">
 order allow,deny
 deny from all
 satisfy all
</Files>

#DENY ACCESS - START
<FilesMatch "config.php|\.tpl$">
 Order allow,deny
 Deny from all
</FilesMatch>
#DENY ACCESS - END

# One year for image files
<filesMatch ".(jpg|jpeg|png|gif|ico)$">
Header set Cache-Control "max-age=31536000, public"
</filesMatch>
# One month for css and js
<filesMatch ".(css|js)$">
Header set Cache-Control "max-age=2628000, public"
</filesMatch>

<FilesMatch "\.(ico|pdf|flv|jpg|jpeg|png|gif|js|css|swf)(\.gz)?$">
Header set Expires "Thu, 15 Apr 2012 20:00:00 GMT"
Header unset ETag
FileETag None
</FilesMatch>


# BEGIN EXPIRES
<IfModule mod_expires.c>
    ExpiresActive On
    ExpiresDefault "access plus 10 days"
    ExpiresByType text/css "access plus 1 week"
    ExpiresByType text/plain "access plus 1 month"
    ExpiresByType image/gif "access plus 1 month"
    ExpiresByType image/png "access plus 1 month"
    ExpiresByType image/jpeg "access plus 1 month"
    ExpiresByType application/x-javascript "access plus 1 month"
    ExpiresByType application/javascript "access plus 1 week"
    ExpiresByType application/x-icon "access plus 1 year"
</IfModule>
# END EXPIRES

# GZIP BEGIN - COMPRESS - .CSS .JS .HTML .XHTML .PHP .TXT
#Gzip
<ifmodule mod_deflate.c>
AddOutputFilterByType DEFLATE text/text text/html text/plain text/xml text/css application/x- javascript application/javascript
</ifmodule>
#End Gzip

<IfModule mod_deflate.c>
    #The following line is enough for .js and .css
    AddOutputFilter DEFLATE js css

    #The following line also enables compression by file content type, for the following list of Content-Type:s
    AddOutputFilterByType DEFLATE text/html text/plain text/xml application/xml

    #The following lines are to avoid bugs with some browsers
    BrowserMatch ^Mozilla/4 gzip-only-text/html
    BrowserMatch ^Mozilla/4\.0[678] no-gzip
    BrowserMatch \bMSIE !no-gzip !gzip-only-text/html 
</IfModule>

<ifModule mod_headers.c>
  Header unset Vary
  Header set Vary "Accept-Encoding, X-HTTP-Method-Override, X-Forwarded-For, Remote-Address, X-Real-IP, X-Forwarded-Proto, X-Forwarded-Host, X-Forwarded-Port, X-Forwarded-Server"
</ifModule>

经过多一点测试后:

我发现的是,如果我转到:

imadeitviral.com /

网站加载

我一进入:

imadeitviral.com/wp-admin

一段时间后,网站会在404时显示消息:

“找不到”

在此服务器上找不到请求的网址/wp-admin/plugins.php。

此外,尝试使用ErrorDocument处理请求时遇到404 Not Found错误。“

0 个答案:

没有答案