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.

Cpanel 404 editor adding extra line / ssi not working [moved]

Discussion in 'General Discussion' started by rbrown56, Jun 14, 2006.

  1. rbrown56

    rbrown56 Registered

    Joined:
    Nov 10, 2005
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    I don't have access to the server and I'm not familar wiht the inner working of cpanel...
    Here is my story and I hope someone can help me.

    I'm hosting on a new provider and I wrote/use a program where it uses this line in the 404.shtml file.
    -------------------------------
    <!--#include virtual="the_404_includes/four_o_four_magic.php" -->
    -------------------------------

    So if I go to cpanel and edit the file it adds this
    -------------------------------
    <!--#include virtual="the_404_includes/four_o_four_magic.php" -->

    <!--


    -->
    -------------------------------
    In a text editor between the extra line there is just a lot spaces.
    If I re-edit the file (cpanel) it will add another line unless I delete the line before saving it.

    On my last provider it didn't do this if I edited the file...


    Second problem...
    I have 29 sites and only one of the 29 sites the ssi will do the virtual call and run the "the_404_includes/four_o_four_magic.php" page.
    On the others I get a blank html file with this:
    -------------------------------

    <!--


    -->
    -------------------------------
    The provider says it's my software and there is nothing wrong with the server.
    I'm using the same software build on every site.
    So if it works on one why don't it work on all?


    The one site it works on is a sub account.
    On the "master" and all the others, it don't.

    I can't figure it out and they aren't helping...
    I'm running out of hair...

    Thanks,
    Bob
     
  2. webignition

    webignition Well-Known Member

    Joined:
    Jan 22, 2005
    Messages:
    1,880
    Likes Received:
    0
    Trophy Points:
    36
    Including a PHP script in a .shtml file merely for handling a 404 seems like a bit of overkill.

    Can you not just specify the relevant PHP script in your .htaccess file?

    Code:
    ErrorDocument 404 /~username/path/to/script.php
     
  3. rbrown56

    rbrown56 Registered

    Joined:
    Nov 10, 2005
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    Here is what it does....
    No matter what the end user to your site types in, it will create a page based on what they type in. So if they type in a wrong page it will pull a page based on what ever they typed in. And it will handle and display a page based on any file extension so if they enter http://your_site/index.html and it supposed to be .php it will pull a page based on that information and they will be able to be redirected to your actual page. Plus you can turn on of off the 404 error so they won't even know they hit a non existent page if you want. Also it can add tons of extra pages to your site to increase the page ranking of your site. And you can trigger it to display niche information by linking to it from your base site or from other pages. In addition, it will run and build pages on your site even with out any pages on your site at all

    Try it on my site that works... funtorent.com I have 0 pages on that site.
    Open a new window and type:

    http://funtorent.com/any_searchable_word/
    or
    http://funtorent.com/any_searchable_word/any_searchable_word.php
    or
    Make it .cfm, .cfml, .html, .htm, .php4, .jsp, .asp, .aspx, .pdf, etc...

    Add any amount of directories, it will work...

    So it really isn't overkill...
    Thanks,
    Bob
     
  4. Soheil

    Soheil Active Member

    Joined:
    Jun 24, 2003
    Messages:
    43
    Likes Received:
    0
    Trophy Points:
    6
    Hi Bob,
    This is cool program.
    Would you mind sharing with us where you got it from?

    Thanks
     
Loading...

Share This Page