Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6845465
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T00:30:14+00:00 2026-05-27T00:30:14+00:00

On a Linux, Apache, PHP site, I need to make certain that a subdirectory

  • 0

On a Linux, Apache, PHP site, I need to make certain that a subdirectory /cms, on my website is not crawlable by the search engines.

See, in the root of the site, I have installed a product catalog called Pinnacle Cart. They wanted a News page that pulls content from a CMS. I brought WordPress online in a subdirectory called /cms, created some posts, and then used the following code to bring that into my Pinnacle Cart theme:

<?php require_once('../../../cms/wp-blog-header.php'); ?>
<?php $i = 1; $MAX_ARTICLES_TO_SHOW = 5; ?>
<?php while (have_posts()): the_post(); ?>
    <div <?php post_class() ?> id="post-<?php the_id(); ?>">
        <h2><?php the_title(); ?></h2>
        <div class="entry">
            <?php the_content(); ?>
        </div><!-- .entry -->
        <div style="clear:both;">&nbsp;</div>
        <small><?php the_time('F j, Y') ?></small>
    </div><!-- #post-... -->
<?php ++$i; if ($i > $MAX_ARTICLES_TO_SHOW) { break; } ?>
<?php endwhile; ?>

Note that some of the images used in the posts will pull from /cms, and I want those to load okay, but I don’t want Google or any search engine to follow anything under /cms.

Note also in WordPress in /cms, I checked off the setting “Do not let sites like Google, Technorati, etc. index this site.”

I’m thinking I’ll need to either adjust the default theme for the WordPress under /cms/wp-content/themes, or put some sort of .htaccess setting in the /cms or / (root) folder of the site.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T00:30:15+00:00Added an answer on May 27, 2026 at 12:30 am

    You can add this to your robots.txt file.

    Disallow: /cms/
    

    Reads more about it at http://www.robotstxt.org/robotstxt.html

    Search engines and scrapers can always ignore this though (Most large search engines will follow the rules). You could check the $_SERVER['HTTP_USER_AGENT'] too, but this can be faked. There is no 100% way of stopping scrapers.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I need to run Linux-Apache-PHP-MySQL application (Moodle e-learning platform) for a large number of
I have a LAMP (Linux/Apache/MySQL/Php) application that I should release soon. Even if I've
I'm on a foreign linux system and need to determine the user that apache
We have a custom PHP/MySQL CMS running on Linux/Apache thats rolled out to multiple
There is site http://abc.com (made in PHP, MySQL, Apache, Linux environment). Currently, MySQL on
I have a site running a Linux/Apache/MySQL/PHP stack. I would like to connect to
I have a PHP web application (running on Apache/Linux) that, among other things, allows
On one Linux Server running Apache and PHP 5, we have multiple Virtual Hosts
I am using PHP with Apache on Linux, with Sendmail. I use the PHP
Is the LAMP (Linux, Apache, MySQL, PHP / Ruby / Python) stack appropriate for

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.