Different versions of robots.txt and .htaccess for test and live servers

Michael McGinnis's Avatar

Michael McGinnis

02 Mar, 2016 09:58 PM

We've been keeping our robots.txt and .htaccess files in Cascade Server. The content of those files needs to be different on the test server and the live server. Maybe I could use different configurations for the two servers, with different filename extensions for the two destinations. That's how we publish a news feed along with our home page: index.html and index.xml. But for robots.txt and .htaccess files, the filenames must be the same.

Is there an easy way to do this?

  1. 1 Posted by Ryan Griffith on 03 Mar, 2016 12:55 PM

    Ryan Griffith's Avatar

    Hi Michael,

    I think your idea of using two different Outputs is the best option; each can have the same file extension but would be mapped to a different Destination in the Content Type's Outputs Publishing configuration.

    Please let me know if you have any questions.

    Thanks!

  2. 2 Posted by Michael McGinni... on 03 Mar, 2016 04:50 PM

    Michael McGinnis's Avatar

    And one configuration uses one content block while the other one uses a different one. Okay, I see how that would work. Thanks. I'd been working on a similar problem, but I didn't realize it wasn't so similar that I needed to use the same solution.

  3. 3 Posted by Ryan Griffith on 03 Mar, 2016 08:36 PM

    Ryan Griffith's Avatar

    You got it, Michael. Or, if you are using the page's structured data, your outputs would simply use different Formats to generate the different content you need.

    I'm going to go ahead and close this discussion, please feel free to comment or reply to re-open if you have any additional questions.

    Have a great day!

  4. Ryan Griffith closed this discussion on 03 Mar, 2016 08:36 PM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac