Forums

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

  1. paigekh
    Member
    Posted 3 months 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!
    Paige

  2. paigekh
    Member
    Posted 3 months 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.

Reply

You must log in to post.

About this Topic