dcsimg
www.webdeveloper.com
Results 1 to 2 of 2

Thread: Include ErrorDocs instead redirect through htaccess

  1. #1
    Join Date
    Apr 2017
    Posts
    1

    Include ErrorDocs instead redirect through htaccess

    Hi there,

    I am trying to achieve including error documents into the invalid url instead of redirecting the user to the error document's url.

    For example.

    When I go to an invalid url e.g www.example.com/invalid.php I get redirected to www.example.com/404.html (because thats how I have set up my apache2.4 settings)

    What I am trying to achieve is something like when you go to www.google.com/invalid/invalid.php (invalid url) the url maintains the same, but the error document is included "silently".

    How can I achieve something like this?

    I am on Ubuntu 15.10 Apache2 PHP7.1

    current error doc redirects in htaccess
    Code:
    	ErrorDocument 403 /403.html
    	ErrorDocument 404 /404.html
    	ErrorDocument 500 /500.html

  2. #2
    Join Date
    Oct 2017
    Posts
    7
    Handle this simply by your server side language, a modern framework should also have support for this.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center