Announcement

Collapse
No announcement yet.

Error pages

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Error pages

    Is there any way I can use cPanel or something to make an error page able to be a .php file instead of a .shtml file? I want to include my navbar and such on my error pages, but I can't since shtml doesn't parse php...

    Thanks.


  • #2
    Something like this?

    http://www.vbulletin.org/forum/showt...om+error+pages
    Translations provided by Google.

    Wayne Luke
    The Rabid Badger - a vBulletin Cloud demonstration site.
    vBulletin 5 API

    Comment


    • #3
      make a new file called .htaccess and put this to your document root and insert


      ErrorDocument 404 http://www.yourDomain.com/errordocument.php


      errordocument.php can be changed to whatever you want.
      That's the end of that!

      Comment


      • #4
        Thanks MrNase and Wayne... MrNase's was more to my purpose, however.

        Thanks guys

        Comment


        • #5
          Also,

          Instead of putting your domain in there, try just putting /errordocument.php. If you do it that way, Apache (if php is configured as an Apache module) will pass all of the error information to php, such as the error code, error message from the server, the page/request the error was generated on, etc.
          - AJ Zmudosky

          Comment


          • #6
            Originally posted by Andy Z
            Also,

            Instead of putting your domain in there, try just putting /errordocument.php. If you do it that way, Apache (if php is configured as an Apache module) will pass all of the error information to php, such as the error code, error message from the server, the page/request the error was generated on, etc.
            It would appear php is not configured because it didn't work :/.

            Oh well. Thanks anyhow

            Comment


            • #7
              Are you sure?

              Did you try to echo out the enviroment variables set on the page?

              vardump($GLOBALS); at the top of the script, will tell you what enviroment variables are set (should be in _ENV, but could also find it in _SERVER)

              Comment


              • #8
                http://www.vbulletin.org/forum/showthread.php?t=65013 includes an error page that will email the webmaster info about the error.

                Comment


                • #9
                  Originally posted by Pugzly
                  http://www.vbulletin.org/forum/showthread.php?t=65013 includes an error page that will email the webmaster info about the error.
                  I don't need to know when they get a 404 .

                  I'll try that, merk.

                  Comment


                  • #10
                    Originally posted by Andrew111888
                    I don't need to know when they get a 404 .

                    I'll try that, merk.
                    Why wouldn't you? Broken links in your own site? Broken links TO your site? If your server is generating 404 errors, it doing work it doesn't need to. I'd certainly want to know if my server was serving up errors instead of good content...

                    Just a thought.

                    Comment

                    widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
                    Working...
                    X