发新话题
打印

[问题求助] 不知道大家搬家有没有遇见这个问题

不知道大家搬家有没有遇见这个问题

搬家之前,在网上了解了挺多相关的可能出现的问题,比如说乱码了什么的,结果这些没有出现。

目前新主机用的是CPANEL,我把主站文件放在一个名为golfreader 的文件夹里,然后.htaccess将主域名重定向去该文件夹(注:CPANEL中主站文件默认直接是放在public_html下的)

一切都准备好了之后,主站访问正常。

但是后台登录,如果我用http://golfreader.cn/wp-admin登录,输入正确的用户和密码,页面只会闪一下就不动了,进不了后台。

如果我用http://golfreader.cn/wp-login.php登录,一切正常,试过发表文章,也正常。

请问大家搬家的时候有没有遇到这样的问题?初步认为是由于.htaccess造成的(因为没有改过别的东西)。如何解决?谢谢大家!

TOP

贴你的.htaccess文件咯。

TOP

请问一下如何才可以看到.htaccess文件啊?我从FTP和WEB FTP上都看不到~~

TOP

# .htaccess main domain to subfolder redirect
# Copy and paste the following code into the .htaccess file
# in the public_html folder of your hosting account
# make the changes to the file according to the instructions.

RewriteEngine on
# Change yourdomain.com to be your main domain.

RewriteCond %{HTTP_HOST} ^(www.)?yourmaindomain.com$

# Change ’subfolder’ to be the folder you will use for your main domain.

RewriteCond %{REQUEST_URI} !^/subfolder/

# Don’t change this line.

RewriteCond %{REQUEST_FILENAME} !-f

RewriteCond %{REQUEST_FILENAME} !-d

# Change ’subfolder’ to be the folder you will use for your main domain.

RewriteRule ^(.*)$ /subfolder/$1

# Change yourdomain.com to be your main domain again.

# Change ’subfolder’ to be the folder you will use for your main domain

# followed by / then the main file for your site, index.php, index.html, etc.

RewriteCond %{HTTP_HOST} ^(www.)?yourmaindomain.com$

RewriteRule ^(/)?$ subfolder/index.php [L]



以上是我新建了记事本里的内容(yourmaindomain.com改为了我的golfreader.cn, subfolder改为了我的文件夹名),直接上传根目录,改为.htaccess..其它地方没动.

TOP

怎么这么多内容
怀念1997年的秋天 这里的天空是灰色的,每天坐着一个怀旧的流浪人BBpress

TOP

注释部分多了.就是一个将http://golfreader.cn/golfreader转向http://golfreader.cn

但这样出现了我第一楼的问题.请帮忙解决

TOP

关注中,我也想知道这个问题怎么解决

TOP

发新话题