最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

Non "Wordpress" pagescode getting 404 error

programmeradmin1浏览0评论

I'm hoping that you are my saviours. There seem be lots of people with this problem on the forums, but no clear answer. Here's my predicament:-

I've just put together a new Wordpress site on new hosting and it works a treat. I'm over the moon at how cool it is. However, on our previous (non Wordpress) hosting we had a little ordering system for our customers that sat in a folder in the route, away from the main. It has it's own index.php and could be reached by going to www.domain/ericsinfo

I brought the folder into the new hosting and positioned in the root just like before, however when I go to www.domain/ericsinfo I get a 404 error within Wordpress. Even if I type www.domain/ericsinfo/index.php, still a Wordpress 404.

I've read that I should edit the .htaccess file, but my template doesn't seem to have one and I don't really want to create one using other peoples recommended code unless I break something.

I can see that Wordpress taking over the 404 process is quite cool and don't want it to disappear entirely. I just want to be able to use the ordering system like we were previously able to.

I'll be eternally grateful for your help!

Matt

I'm hoping that you are my saviours. There seem be lots of people with this problem on the forums, but no clear answer. Here's my predicament:-

I've just put together a new Wordpress site on new hosting and it works a treat. I'm over the moon at how cool it is. However, on our previous (non Wordpress) hosting we had a little ordering system for our customers that sat in a folder in the route, away from the main. It has it's own index.php and could be reached by going to www.domain/ericsinfo

I brought the folder into the new hosting and positioned in the root just like before, however when I go to www.domain/ericsinfo I get a 404 error within Wordpress. Even if I type www.domain/ericsinfo/index.php, still a Wordpress 404.

I've read that I should edit the .htaccess file, but my template doesn't seem to have one and I don't really want to create one using other peoples recommended code unless I break something.

I can see that Wordpress taking over the 404 process is quite cool and don't want it to disappear entirely. I just want to be able to use the ordering system like we were previously able to.

I'll be eternally grateful for your help!

Matt

Share Improve this question asked May 6, 2011 at 17:24 user5176user5176 111 silver badge2 bronze badges 0
Add a comment  | 

3 Answers 3

Reset to default 1

The problem your having is because of the way the WordPress rewrite system works. The WordPress .htaccess sends all requests (that dont actually exist except index.php) through the index.php file in the WordPress root directory. If any request is made for a file named index.php it will also get sent through the root WordPress index.php.

A simple solution would be to rename the index.php file in /ericsinfo to default.php. Depending on your hosting setup it might work by just doing that. If it doesn't you can add a 301 redirect to your .htaccess that points www.domain/ericsinfo to www.domain/ericsinfo/default.php

Redirect 301 /ericsinfo http://domain/ericsinfo/default.php

The .htaccess file will be located in your public_html or root public web directory.

you have to make it as a theme with a style.css in wp-content/themes folder then active the theme. Otherwise wordpress won't find it.

http://www.siteground/tutorials/wordpress/wordpress_create_theme.htm

Please add this line at begin of your sub-directory htaccess file.

ErrorDocument 401 default

发布评论

评论列表(0)

  1. 暂无评论