字preSS在base.example.com和可从example.com给我路径问题HostGator的 [英] WordPress in base.example.com and accessible from example.com give me path issue in Hostgator

查看:249
本文介绍了字preSS在base.example.com和可从example.com给我路径问题HostGator的的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个字符preSS 安装在子域。我希望有在网站上显示该网站的 example.com

在Word preSS文件夹位于 base.example.com 和路径的的public_html /文件夹1 /基的。

如果我从具有的主页网站的网址的子域名运行的网站指向 base.example.com 一切工作正常。如果我的第二个URL更改为我的根的 example.com 复制的的index.php 的(改变路径)和的.htaccess 的到的的public_html / 的我得到了以下问题:

  1. .htacces 的是不是从字preSS写
  2. 吨重定向问题
  3. 在管理栏消失(在这里解决的<一个href="http://stackoverflow.com/questions/24708340/admin-bar-doesnt-appear-on-the-front-end-of-a-word$p$pss-website">Admin栏没有显示在一个Word preSS网站的前端)
  4. 如果我打开定制我得到的错误(模板的问题...用默认的wp主题一切正常)
  5. 使用 USERPRO 插件登录我重定向到默认的文字preSS登录页面后,来管理我的用户(这意味着有东西遗漏在URL重定向)编辑:这是路径userpro登录后出现的登录页面上:<一href="http://base.exaple.com/wp-login.php?redirect_to=http%3A%2F%2Fbase.example.com%2Fwp-admin%2F&reauth=1" rel="nofollow">http://base.exaple.com/wp-login.php?redirect_to=http%3A%2F%2Fbase.example.com%2Fwp-admin%2F&reauth=1 ......我仍然在等待一个答案从笔者
  6. 有时我preSS登出它只是刷新管理页面。
  7. 当我访问base.example.com我不是重定向到example.com ...这是正确的?它不应该重定向我呢?

5天我试图解决它,所以我也写为 HostGator的的支持,因为我认为我做的一切都是正确的方式,但他们只是说他们不能支持问题至极来了从定制....但这不是一个定制,只是实现从一个子工作的一个简单的词preSS安装!

希望你能帮帮我!

修改

htaccess的的(无论是在的public_html /和的public_html / folder1中/碱是相同的)

 #BEGIN字preSS
&LT; IfModule mod_rewrite.c&GT;
RewriteEngine叙述上
的RewriteBase /
重写规则^指数\ .PHP $  -  [L]
的RewriteCond%{} REQUEST_FILENAME!-f
的RewriteCond%{} REQUEST_FILENAME!-d
重写规则。的index.php [L]
&LT; / IfModule&GT;
#结束字preSS
 

的index.php(根)

 规定(./文件夹1 /基/可湿性粉剂博客 - 的header.php');
 

index.php文件(在的public_html /文件夹1 /底座)

 规定(./可湿性粉剂博客 - 的header.php');
 

编辑2

  1. 在我刚得到一些404错误...

更新问题4,5,6

  1. 您的建议是行不通的。 301重定向强制字preSS找到他的文件的public_html,而不是安装文件夹,显然无法找到任何东西给我一个错误。我也改变了URL形式example.com到base.example.com但没有!

我试图安装Word preSS在一个简单的子文件夹,所有的问题消失,但我固执我要实现使字preSS的一个子域,而不是一个子文件夹的工作...

解决方案
  1. 的.htaccess是可写的是不寻常的,是该网站是在 不同的目录。
  2. 重定向问题
  3. 吨不是一个问题,我需要一个错误来帮助你解决这个问题。
  4. 在<一个解决了我的回答href="http://stackoverflow.com/questions/24708340/admin-bar-doesnt-appear-on-the-front-end-of-a-word$p$pss-website">Admin栏没有显示在一个Word preSS网站的前端。
  5. 这不是一个问题,我需要一个错误来帮助你解决这个问题。
  6. 您应该通过联系 UserPro支持团队的codeCanyon帐户的支持,他们的产品。
  7. 当你发生了什么错误无法注销?我需要一个错误来帮助你解决这个问题。
  8. 这是正常的行为。您可以通过301重定向在你的的.htaccess 的子域文件夹(不是你的网站的根)的根目录中更改。这code不包括/可湿性粉剂内容/ *(上载的访问,访问的插件,主题文件访问等等),/可湿性粉剂管理员/ *(为管理员权限),和/ WP-包括/ *(重要字preSS包括访问)。试试这个code,看看会发生什么:

      RewriteEngine叙述上
    的RewriteCond%{REQUEST_URI}!^ /可湿性粉剂内容/
    的RewriteCond%{REQUEST_URI}!^ /可湿性粉剂管理员/
    的RewriteCond%{REQUEST_URI}!^ / WP-包括/
    重写规则(。*)http://www.example.com/$1 [R = 301,L]
     

I have a WordPress installation at Subdomain. I wish to have the website display the site at example.com

The WordPress folder is located at base.example.com and the path is public_html/folder1/base.

If I run the site from the subdomain with home and site url pointing to base.example.com everything works fine. If I change the second url to my root example.com copying index.php (changing the path) and .htaccess to public_html/ I get the following issue:

  1. .htacces is not writable from wordpress
  2. tons of redirect issue
  3. admin bar disappear (solved here Admin bar doesn't appear on the front-end of a WordPress website)
  4. if I open the customizer I get errors (TEMPLATE ISSUE... with default wp themes everything works)
  5. Using USERPRO Plugin to manage my user after login I'm redirect to the default wordpress login page (that means there is something missed up in url redirect) EDIT: This is the path on the login page that appear after userpro login: http://base.exaple.com/wp-login.php?redirect_to=http%3A%2F%2Fbase.example.com%2Fwp-admin%2F&reauth=1 ... I'm still waiting for an answer from the author
  6. sometimes when I press logout it just reload the admin page.
  7. when I visit base.example.com I'm not redirect to example.com... is this right? it shouldn't redirect me instead?

Are 5 days that I'm trying to solve it so I also wrote to hostgator support because I think I did everything in the right way but they just say they can't support issue wich came from customization....but this is not a customization, is just making work a simple wordpress installation from a subdomain!!!

Hope you can help me!

EDIT

.htaccess (both in public_html/ and in public_html/folder1/base are the same)

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

index.php (in root)

require('./folder1/base/wp-blog-header.php');

index.php (in public_html/folder1/base)

require('./wp-blog-header.php');

EDIT 2

  1. I just get some 404 errors...

Updated question 4,5,6

  1. Your suggestion doesn't work. 301 redirect force wordpress to find his files in public_html instead the installation folder and obviously it can't find anything giving me an error. I've also changed the url form example.com to base.example.com but nothing!

I've tried to install wordpress in a simple subfolder and all the issue disappear but as I'm stubborn I want to achieve to make wordpress working in a subdomain instead a subfolder...

解决方案

  1. .htaccess being writable is not unusual, being that the site is in a different directory.
  2. Tons of redirect issues isn't a question, I would need an error to help you solve that problem.
  3. Solved by my answer at Admin bar doesn't appear on the front-end of a WordPress website.
  4. This isn't a question, I would need an error to help you solve that problem.
  5. You should contact the UserPro support team via their CodeCanyon account for support with their product.
  6. What error occurs when you are unable to logout? I would need an error to help you solve that problem.
  7. This is normal behavior. You can change this through a 301 redirect in your .htaccess within the root of the subdomain folder (not the root of your website). This code excludes /wp-content/* (for uploads access, plugins access, theme file access, etc.), /wp-admin/* (for admin access), and /wp-includes/* (for important WordPress includes access). Try this code and see what happens:

    RewriteEngine on
    RewriteCond %{REQUEST_URI} !^/wp-content/
    RewriteCond %{REQUEST_URI} !^/wp-admin/
    RewriteCond %{REQUEST_URI} !^/wp-includes/
    RewriteRule (.*) http://www.example.com/$1 [R=301,L]
    

这篇关于字preSS在base.example.com和可从example.com给我路径问题HostGator的的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆