[resolved] Can category and post pages be blocked? (existing site integration) (2 posts)

  1. paigekh
    Posted 3 years ago #

    Hi there,

    I've integrated WordPress into an existing website as a way for the client to directly edit their news page. The technique works great, but I would like to block category and post pages, which are showing up in search results. These are the theme-less pages ending with ?cat=1 and ?p=59, for example. Is there a preferred way to block those pages?

    Thanks in advance!

  2. paigekh
    Posted 3 years ago #

    I found a solution, and I haven't noticed any problems with it yet.

    First, I renamed index.php, which disabled all the offending pages and kept my pulled-in-via-php page intact. Easy enough.

    Navigating to the directory was displaying the directory contents, so I added "Options -Indexes" to the .htaccess file - it now returns a "403 Forbidden" error. I'm assuming Google will eventually drop those pages from its index.

    Hope this helps someone in the future.

Topic Closed

This topic has been closed to new replies.

About this Topic