I created custom 404 error page called error.php, now I want to display the error.php content in user entered url.like this link: http://www.youtube.com/asdfasfsd
This is my htaccess code:
ErrorDocument 404 https ://localhost/path/error.php
I want to show the error.php content in same URL without redirect to error.php page
if user typed invalid url (for example:https ://localhost/path/nnn.php)
current result:redirecting to error.php
expected result:display error.php content in https ://localhost/path/nnn.php
My full htaccess code:
Options +FollowSymlinks
RewriteEngine On
RewriteCond %{HTTPS} !on
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}
RewriteRule index.html$ index.php [L]
RewriteRule service.html$ service.php [L]
RewriteRule ^([^/]*)\.html$ about.php?pid=$1 [L]
RewriteRule ^cont/([^/]*)\.html$ contact-inner.php?tid=$1 [L]
RewriteRule ^contact/([^/]*)/([^/]*)\.html$ contact-page.php?tid=$1&ona=$2 [L]
RewriteRule ^about/([^/]*)\.html$ about-inner.php?oid=$1 [L]
RewriteRule ^service/([^/]*)/([^/]*)\.html$ service-page.php?oid=$1&ona=$2 [L]
ErrorDocument 404 https://localhost/ezhil/path/public_html/error.php
<Files 403.shtml>
order allow,deny
allow from all
</Files>
deny from 117.202.102.84
deny from 58.68.25.210
deny from 91.200.13.112
deny from 86.128.130.170
deny from 91.200.13.7
deny from 173.208.206.90
.htaccess. if noRewriteRuleis met, then executeerror.php. Theurlwill stay the same, but theerror.phpwill be executed. no time for me to answer now, lunch break :P/etc/apache2/(as server administrator), but changing a.htaccessis an edit of the web application. The.htaccessfile is a part of a website resp. a web-application (like a CMS), and therefore it does count to web-development in my opinion.