开发者

.htaccess issue in Wordpress giving 404 on all pages

开发者 https://www.devze.com 2023-03-27 20:46 出处:网络
I have a wordpress multi-site: site1.local.loc [with subdomains on my local] and I would like to have three pages on this.

I have a wordpress multi-site:

site1.local.loc [with subdomains on my local] and I would like to have three pages on this.

site1.local.loc/works - (posts page, but I want 'Works' as my title)

site1.local.loc/about - (static page)

site1.local.loc/contact - (static开发者_运维问答 page)

Since 'Works' is my posts page where I keep putting in content, I changed my permalinks for this site to:

/works/%postname%/

However, when clicking on 'view post' at the end of posting anything, it leads me to a '404' page which means there is a disconnect. This is also the case for viewing any page. Is my .htaccess file faulty?

How do I solve this? Also how do I make all my posts appear in my 'Works' page (as in, how to make that page the posts page?)

Thanks!

Updated: I've found out that I get a 404 for any page that I create for a site in a wordpress network.


You do not have to touch .htaccess file.

Make a custom post type that is called works. All those posts made in that custom post type will have that url that you desire. There is no other way to do it. (even if there is, it must be dirty) That is celanest way, and since wp does it by itself you can expect that nothing will go wrong wnen you update, install plugins, etc.


Create a category called "Works" that would then show all posts added to that category by simply going to /works/ all posts would then be shown as /works/post-name/.

You will need to change the permalink structure to /%category%/%postname%/


Check this in administration

Settings > Permalinks > Post name

0

精彩评论

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

关注公众号