404 error pages

Right now, I have my .htaccess configuration while if I go to www.website.com/nonexistantpage.htm it takes me to the right page of 404 error. But my site is built around variables php for pages to visit the home page is not website.com/home.htm is website.com/index.php?page=home

So, if I do

website.com/index.php?page=nonexistant page

I just get a php error that the file does not exist. Instead, I want that he also point to my error page. How do I configure this?

Nevermind, figured it out myself and it works:

<>

$page = (isset($_GET['page'])? strtolower($_GET['page']): 'home');

$file = ' content /'. $page. ». PHP ';

{if (file_exists ($file))}

} else {}

$page = "error404"

}

require_once ("header.php");

require_once ("content / '. '") $page. "." "" ""php");

require_once ("footer.php");

?>

I know it's messy but it's the first php code, I've never really done. I'll be better, but it does the job.

Tags: Dreamweaver

Similar Questions

  • Adding a custom 404 error page for the specific deployment folder

    Hi all

    I've created a deployment that I will use htm/pdf files static analysis on OBIEE.

    The link to these files are generated dynamically which works well, but unfortunately, means that it displays a link to a file that doesn't exist may not.

    I am looking for a way to manage it in the most user-friendly way. For the moment, it shows the very trivial/useless error of:


    Error 404 - not found

    Of RFC 2068 Hypertext Transfer Protocol - HTTP/1.1:

    Is it possible to add a custom 404 error page that applies only for searches in this deployment?

    Thanks heaps

    Adam

    It's a thing of weblogic, so in your deployment, I guess you can add info on the custom 404 in the files in WEB - INF of your deployment (have a loook at pages to customize error in Weblogic if that's what you're looking for or just google about 404 custom in weblogic).

  • Automatic notification of the scope of the 404 error Page

    Is it possible to set up a notification for every time someone reached the 404 error page?

    Details such as:

    Reach the URL and referring URL?

    You can use a form that is defined on auto-présenter on this page and enter the details you need.

    Kind regards

    Mihai

  • Can not do custom 404 error page

    CF MX 7.02 Server

    I have redesigned the site to q10.ca and have tons of non-existent *.cfm pages. After changing the default 404 error page in IIS, no matter what I do, I can't get rid of the box "Error occurred while processing request" by default which is the default value for the mistakes of CF. I get the 404 error page customized for any non-existent '.htm. the pages, but not for pages ".cfm". I tried a lot of things:

    -change the settings in the administration for CF server settings
    -added code in Application.cfm:
    < cferror type = "exception".
    exception = "Any"
    model = "404.cfm."
    mailto = "[email protected]" >

    < cffunction name = "onMissingTemplate" = "boolean" returnType >
    < cfargument type = 'string', name = 'targetPage"required = true / >
    ...
    < cfreturn BooleanValue / >
    < / cffunction >

    -created an Application.cfc file with the same code

    What I want to do is simply redirect all the errors for a missing page on the same page and after 3 hours I can't even accomplish this simple task.

    Best regards, Chris

    If you have a card configuration of generic request for your site to the CF in IIS,
    then you select "Check that file exists" for the card instead
    .cfm file:

    on the Mappings tab, see if you have an entry in the "Wildcard
    section of application cards and if you do, select map and click
    Button 'change... '. "then top, then select the 'check that file exists".
    checkbox.

    Manager model missing in CF admin - is a global parameter
    CF server. It is NOT specific to the site. so if you it, EVERYTHING you describe FC
    sites on the same server/instance of CF will have the same 404 error page.

    Azadi Saryev
    SABAI - Dee.com
    http://www.SABAI-Dee.com/

  • Using a 404 error page customized to query

    I spent a little waiting for more results from google related to this, but haven't find yet anything that matches what I'm trying to do.

    Is to use "search engine safe" URLS, more specifically, I want to show www.mydomain.com/test but actually run www.mydomain.com/search.cfm?s=test. From what I gathered, the most effective way is to use a custom 404 error page and a cfinclude of the search page it contains.

    Now the part that I fight with is how I take the 'test' of 'www.mydomain.com/test' and is like a variable that I can spend in the cfinclude tag.

    Rough code, I took a "guess" with up to now is the following;

    < cfset cleanpath = REReplace (CGI. QUERY_STRING, "\?" | ------& | \ = », « / », « ALL ») >
    < cfset cleanpath = Replace (cleanpath, "404;) (' http://#CGI.SERVER_NAME#:#CGI.SERVER_PORT# ', '',' ALL') >
    < cfinclude template = "search.cfm? = #cleanpath #" >

    The foregoing translates currently a message "Invalid Argument."

    Pointers or available examples would be appreciated with gratitude!

    This command removes the http:// off the file name.

    Then find / thanks to locate, like this.

    Then remove the end / as appropriate.


    This leaves you with the relative path, and the name of the requested file.
    If you want just the name of the file, you can divide on / and take the last item like that, but don't forget to strip / the end first as above, otherwise it will not work, I don't think.

    I hope this helps.

  • Premiere Pro Control Panel Getting Started Guide links to 404 error page

    The first Panel on this page start guide: Premiere Pro Developer Center | Adobe Developer Connection is broken. It leads to an error page 404 on github. Does anyone have a copy of what you can share?

    Thank you Alex for that bring to our attention.  We will be updating the DevNet site.

    In the meantime, Bruce tells me that he folded this documentation in the Readme you will find here:

    https://github.com/Adobe-CEP/samples/tree/master/PProPanel

  • I need help with Google Analytics in my Adobe Muse Web site. behavior of the 404 error pages

    I created and published a Web site using the muse of adobe.
    After you have copied and pasted the tracking codes exactly in Muse master pages that have then been copied to all pages of the site.

    Opening google analytics,
    Menu option > Reporting
    Under menu > behavior > the content of the Site > Pages

    All my pages have an icon next to them that looks like this:
    Screen Shot 2015-10-15 at 15.29.56.png
    That when I click on takes me to a default error page that says:

    Error 404 File not found

    The page you are looking for has been deleted,
    had its name changed or is temporarily unavailable.

    I can't understand why the pages meet errors and would be deeply grateful if someone could guide me through the resolution of this problem.

    Thank you.

    Please check the links used for page icons, in addition, the page that shows GA in the console, check if the url and page etc. are the same that you configured in the Muse.

    https://helpx.Adobe.com/Muse/how-to/use-Google-Analytics.html

    https://www.YouTube.com/watch?v=CydlFjcmStw

    Thank you

    Sanjit

  • How can I change the look of my 404 error page.

    Hello. While I have one of my old sites closed I have them redirected directly to my page again. The question is for them they have entered the address incorrectly when they click a broken link that connected to my old site that they are sent to an ugly error page that implies.

    How/i go on editing this page so I can at least display a message they have been redirected?

    Hello

    To change the 404 - go to the Site Manager page, and then click the system Pages - there is a 404 there Editor.

    You can add 301 redirects for these URL - it is not necessary to indicate that you have been redirected, and it's the best way friendly search engine for that.

    Catalyst for help | Create redirects of page

    Hope this is useful.

    Matt

  • Custom 404 error pages are allowed with InContext?

    Hello

    When I go to edit a page using InContext, I just get my 404 custom error page. I think that InContext worked before I put it to the top.

    I am also having my Web host, crystaltech, check the configuration of HEAD request method.

    Thank you!

    PS Si can someone tell me precisely what I will say to the host of the site on the HEAD request method configuration, I'd appreciate it really that too.

    Hello treehuggerinny,

    Looks like you're aware of this document, but just to be sure, here is more information on the question I think you encounter: http://go.adobe.com/kb/ts_kb406749_en-us

    Have you tried to resave the configuration of your site, because you have added the custom 404 page?

    Best regards

    Corey

  • Driver downloads raise a 404 error pages

    Hello, I am trying to download the drivers for the LaserJet M2727 for Vista, but all download links a return 404 error!

    http://h20000.www2.HP.com/bizsupport/TechSupport/SoftwareIndex.jsp?lang=en&cc=us&prodNameId=3377076&...

    Help, please!

    Try a different browser.  Could be a firewall issue.

  • Everyone gets a 404 error page when they search on the adobe stock?

    I get an error 404 page error when I search something on Adobe Stock.

    Sorry guys - small wrench in the works. Should be set temporarily, if it is not already set.

  • HTTP 404 error: Page not found

    I got a * "HTTP Error 404: Page not found" * when I plug by branch of Page identified by post using the F103_NEXT_PAGE application_item the element. I looked at the apache error log and found the following error message:

    [Mar 26 May 16:47:13 2009] [error] mod_plsql: \nwwv_flow.accept /pls/apexcfp8/wwv_flow.accept HTTP-404: SIGNATURE (parameter names) in FORM STEPS in PROCEDURE MISMATCH\nVARIABLES: CURRENTELEM\nNON-by DEFAULT the VARIABLES in a PROCEDURE NOT UNDER FORM: \n

    I have always received the same * "HTTP Error 404: Page not found" * when I plug through to go to the Page using the application_item * & F103_NEXT_PAGE.* as the page.

    Can someone help me please. I'm under a tight deadline, and I can't test the application until it is resolved.

    Thank you in advance.

    Robert

    The model of list named list progress PA-Assistant has a hidden element defined in it? Where did this come from?

    < tr>< td class="t15Current" >#TEXT#< input type="Hidden" id="CurrentEle" name="CurrentElem"/ >< /td >< /tr >
    < tr >< td class="t15CurrentImage" >< img src="#IMAGE_PREFIX#arrow_down.gif" width="7" height="6" alt="" / >< /td >< /tr >
    

    Scott

  • Passing the parameter of workflow with shows the http 404 error pages

    Hello

    I have a parent workflow with fragments of page deleted as a region on a page. The fragment of a page in the parent workflow displays the read-only table employees. The service Id of the table appears as a link. When you click this link, the following is provided:

    • action listener is called which calls the managed bean that retrieves this Department Id and defines in the pageFlowScope.
    • Pass this value as an input to the child workflow parameter. Child workflow contains its display type is inline-popup page.

    The problem is that when there is no parameter passed to the child workflow the popup is fine. But if the parameter is passed it gives the following error:

    ADF_FACES - 60105:HTTP error state Code: 401.

    Parameters passed from parent to child, such as:

    #{pageFlowScope.DepartmentIdBean.value}

    (DepartmentIdBean is the bean class that gets and sets the Id selected Department)

    Parameter received in the child as workflows:

    #{pageFlowScope.pdeptId}

    Can someone please help me solve this problem? Is that the path parameter is spent creating problem? The same scenario works very well if the child workflow is invoked with fragments of page and like exterior window. I use JDev 12 c.

    I looked at the code and modify it to make it work. There were a few errors. the way main reason you got the error was that you tried to read the non-existing parameter values.

    Download the app from work OTNempDeptTaskFlow.zip | JDev & amp; Goodies ADF

    After downloading the doc you rename to zip and can then decompress.

    Timo

  • The Adobe Flash team blog points to a 404 error page

    https://helpx.Adobe.com/Flash/using/as-to-HTML5.html

    Correct link for the Flash Pro team blog is the following: https://blogs.adobe.com/flashpro/

    The page you are looking for should be this:

    Conversion of your Flash in HTML5 Canvas ads | Adobe Flash Professional Team Blog

  • Cannot download CS3 Master Collection (English - International) 1 2 (4.4 GB) file - direct for me a 404 error page. I can download the file 2 of 2.

    As indicated in the title...

    Try the following: go to this page and make sure you get connected with your Adobe ID: https://www.adobe.com/cfusion/tdrc/index.cfm?product=photoshop_elements (do not download anything from here).

    Then try downloading from https://helpx.adobe.com/creative-suite/kb/cs3-product-downloads.html

Maybe you are looking for

  • virus bankworm message is my mac now infected?

    I just got a message from virus worm Bank who then directed me towards mackeeper, is my mac now infected? do I have to buy mackeeper or anti-virus software will be good enough?

  • WANT to 4500 wireless issues

    Hello I'm trying to set up my new 4500 want on my windows 8 PC, wireless. I connected the printer through the wireless on the printer setup screen to the network. I think it's successful because the print report said "without problems" and I have a l

  • missing Windows zero configuration service

    Running Vista and Netgear router for a few years with no problem, use wireless.   Wireless a few days ago has stopped working. Began to go by the verification of the router (which works very well with ethernet cables) and then discovered that the Win

  • Suddenly, that I can not connect to Skype on desktop Win10

    Hello (V. 7.29.0.102) Skype works normally on my Windows desktop of 10 without problem until today. Now when I try and sign it is said that "sorry, we did not recognize your connection details. Please check your Skype name and password and try again.

  • I can't activate my Windows 7 Home Premium because of the area restriction/limitation

    Hello I don't know what to do on this subject... just help... I bought a genuine Windows 7 Home Premium (I have the license number in a sticker on my laptop) in Indonesia, I installed it in a hurry and I thought that I activated in Indonesia. Now I'm