开发者

Wordpress, why doesn't my blog load the posts if U use the /subfolder domain method?

开发者 https://www.devze.com 2023-01-06 14:05 出处:网络
I have a blog at http://hamids-it.elaosta.com amongst others. If I tr开发者_如何转开发y to access it from

I have a blog at http://hamids-it.elaosta.com amongst others. If I tr开发者_如何转开发y to access it from

http://elaosta.com/hamids-it it loads the blog but says it couldn't find the page I wanted.

How do I fix this so I can use either?


I'm guessing you have a standard subdomain install, whereby http://subdomain.example.com is mapped to the directory /example.com/public_html/subdomain?

In any normal circumstance, say with a static HTML file, you can rightly access the same resource at both example.com/subdomain/resource.html and subdomain.example.com/resource.html.

However, in your case, WordPress is parsing the REQUEST_URI and using it to determine what to show.

So in the case of http://elaosta.com/hamids-it, WordPress is actually looking for a page 'hamids-it' - and if it doesn't find it, voila, your 404.

The fix?

You'll need to decide which way you want to access your blog, subdomain or sub-directory, then stick to it.

When you've made a choice, update your General settings in WordPress admin and set both address URL's to either http://hamids-it.elaosta.com or http://elaosta.com/hamids-it.

0

精彩评论

暂无评论...
验证码 换一张
取 消