The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Command to upload 404 files to multiple domains.

Discussion in 'General Discussion' started by prettydumb, Aug 31, 2007.

  1. prettydumb

    prettydumb Active Member

    Joined:
    Aug 25, 2007
    Messages:
    35
    Likes Received:
    0
    Trophy Points:
    6
    When I set up my domains, several thousand of them, I did not include 404 error pages or robots.txt files. My logs show I should also be uploading favicons as well.

    I now know I should have set this up as I was entering the domain name into the system.

    Is there a command you might share to have these files entered, without having to log into each separate account?

    Someone please throw a dummy a bone.
     
  2. jalal

    jalal Active Member

    Joined:
    Jun 15, 2005
    Messages:
    33
    Likes Received:
    0
    Trophy Points:
    6
    You could probably use a bash script. something along the lines of:

    for d in `ls -1 /home`
    cp robots.txt /home/$d/public_html
    chown $d:$d /home/$d/public_html/robots.txt
    next

    that's just pseudo code above, you'll have to write and test yer own to do it for real.

    HTH
     
Loading...

Share This Page