Is there a fixed set of htaccess rewrite rules I can use to "turn off" everything blogging related?

It's not enough to just not show the links in the menu, I want to completely hide everything related to the blog part, including blog posts, archives, tag and category pages. So people or robots can't come across it by guessing the url or though the sitemap.xml In other words just use WP as a CMS for a website.

  • Don't ask for plugin recommendations, they are off topic here. I would delete that part to keep your question on-topic :-). Just out of curiosity, any specific reason you need to to this. I would look at pages instead of posts as it seems to be more inline with what you are trying to do – Pieter Goosen Feb 25 '15 at 17:00
  • @PieterGoosen Ops sorry. I see you edited it already. I'm using pages, and I'm not using posts. So I don't want empty archive pages or an empty www.mysite.com/blog/ I've clarified my question a bit. – Eystein Feb 25 '15 at 17:09

You are already using pages which does not work the same as posts.

You have to remember, pages don't have taxonomies and they are excluded from the main query by default on all archive pages and the homepage, so there can never be any links to any kind of archive.

Archive pages, whether date, category or tag archives, are just dummy/virtual "pages" which does not exist. Archive pages are just a way to group posts together which shares a common object. If a grouping object does not exist, the archive page can never exist

To conclude, there will be no links to archive pages that can be "guessed" by robots or humans, it is as I said, they will never exist. Links that does not exist will never be indexed anyway.

And any link in a site that does not exist will simply 404, it will not display blank pages

  • That's great news about how archive pages function, I wasn't quite clear on that before. – Eystein Feb 26 '15 at 9:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.