can use. htaccess to specify their own prepared Error alert page. In general, people can set up a directory specifically, such as errors to place these pages. And then again. htaccess, add the following instructions:
ErrorDocument 404/errors/notfound.html
ErrorDocument 500/errors/internalerror.html
A single line of instructions. The first instruction above means that the page is displayed as a notfound.htm
Errors | error handling using PHP error handling
One of the common errors on the Web is an invalid link. Once an invalid link appears from another site, you will rearrange your
's site. People will save their favorite sites in a book, and if they visit again after three months, only the ' 404 Not Fount ' will be found.
will not give them task help, tell them how to find the original information from your site. Let's solve this problem, or at least
Give your users a friendly help and get some tr
Error alert page. In general, people can set up a directory specifically, such as errors to place these pages. And then again. htaccess, add the following instructions:
ErrorDocument 404/errors/notfound.html
ErrorDocument 500/errors/internalerror.html
A single line of instructions. The first instruction above means that the page is displayed as a notfound.html page in the/errors directory for 404, which
their own prepared Error alert page. In general, people can set up a directory specifically, such as errors to place these pages. And then again. htaccess, add the following instructions:
ErrorDocument 404/errors/notfound.html
ErrorDocument 500/errors/internalerror.html
A single line of instructions. The first instruction above means that the page is displayed as a notfound.html page in the/errors direc
Tags: Err load notation Entry doc write module httpd directory1. Turn on use. htaccess Remove the following comment LoadModule Rewrite_module modules/mod_rewrite.so In Apache's httpd.conf settings Options FollowSymLinksAllowOverride None instead Options FollowSymLinksAllowOverride All 1. How to Htaccess . htaccess must be uploaded in ASCII mode, preferably set to 644 Locating the error document: ErrorDocument error code/directory name/name. extension
you'd like to keep the file or open it directly. If you don't want to see this, you can put the following piece of code in your. htaccess file.
Addtype?application/octet-stream?. Pdf
Addtype?application/octet-stream?. Zip
Addtype?application/octet-stream?. mov
4. Omit WWW prefixesOne of the principles of SEO is to make sure that your site has only one URL. Therefore, you need to turn all the access through the WWW to non-www, or reverse this.
Rewriteengine? On
Generally after the Apache build a site, will set the following error jump.
The code is as follows
Copy Code
ErrorDocument 404 "Http://www.111cn.net"
Last Try date 2007-7-8: We detected that your 404 (file not found) error page returns a 200 (successful) status in the header.
Then listen to the Web page that is the address problem so
Try the trial file, instead
The code is as follows
Copy Code
Error response (Apache type)# A total of three styles:## 1) Plain text#ErrorDocument "The server made a boo boo.# Note: The first "number" is used to indicate the text, not actually output## 2 Local redirection#ErrorDocument 404/missing.html# to redirect to the local url/missing.html#ErrorDocument 404/cgi-bin/missing_handler.pl# Note: A script or document that c
: Displays all files in the directory, but does not include a small diagram of the file type
Indexignore *.php *.exe: Hide specific files, the rest of the files are displayed normally (Hide all PHP and EXE files)
Use. htaccess to create a custom error page
This is a very simple thing for Linux Apache. Use the following. htaccess syntax you can easily complete this function. (Put the. htaccess in your site root directory)
ErrorDocument 401/error/40
://(. +\.)? 2zzt\.com/[NC]
Rewritecond%{http_referer}!^$
# wordpress Theme Download Station reminder:/notlink.png for the hotlinking display of the picture, it is recommended to use small size, lest because the picture is too big, two times wasted!
Rewriterule. *\. (jpe?g|gif|bmp|png) $/notlink.png [L]
3, the WordPress feed source for 301 redirectSpeaking of this function, to be honest, the small part is still very unfamiliar, the reason is that the small series has not used the
)
DirectoryIndex index.html
Error log
ErrorLog "Logs/error.log"
Access log
Customlog "Logs/access.log" common
Configure parsing PHP
AddType application/x-compress. Z
AddType application/x-gzip. GZ tgz
AddType application/x-httpd-php. php
Type of error
#ErrorDocument "The server made a boo boo."
#ErrorDocument 404/missing.html
#ErrorDocument 4
Error | One of the common errors in error handling on the Web is an invalid link. Once an invalid link appears from another site, you will reschedule your
's site. People will save their favorite sites in a book, and if they visit again after three months, only the ' 404 Not Fount '
will not give them task help, tell them how to find the original information from your site. Let's solve this problem, or at least
gives your users a friendly help and can get some traces if they encounter a '
site directory under the Htdocs directory. can access all site directories under the Apache2.2 directory.
2. Default access to the first page of the file name configuration:
"
Through this setting, you can control the site's default home page;
A host header similar to the IIS server configuration;
3. Log
Logs/access.log This file records the user's access, access to the IP page, and other information;
4. Error notification Information configuration
# Some Examples:
#
Locate Apache's profile httpd.conf file and find:
The code is as follows
Copy Code
#LoadModule Rewrite_module modules/mod_rewrite.soRemove the front # number.LoadModule Rewrite_module modules/mod_rewrite.so
Then in Accessfilename htaccess (this setting in Windows)
If it's still not working, we can set the site to
The code is as follows
Copy Code
DocumentRoot "d:/xxx/bb/"ServerName 127.0.0.1:80directoryindexindex.phpOptions Index
One of the common errors on the Web is an invalid link. Once an invalid link appears from another site, you will rearrange your
's site. People will save their favorite sites in a book, and if they visit again after three months, only the ' 404 Not Fount ' will be found.
will not give them task help, tell them how to find the original information from your site. Let's solve this problem, or at least
Give your users a friendly help and get some traces if they encounter a ' a 404 ' error. You can
the Apache allowoverride directive.
The directives in the subdirectory overwrite the instructions in the higher-level directory or the primary server configuration file.
. htaccess must be uploaded in ASCII mode, preferably with the permissions set to 644.
Locating the wrong document
Common Client Request error return code:
401 Authorization Required
403 Forbidden
404 Not Found
405 Method Not allowed
408 Request Timed out
411 Content Length Required
412 Precondition Failed
413 Request Entity To
see this, you can put the following piece of code in your. htaccess file.1.AddType Application/octet-stream. pdf2.AddType application/octet-stream. zip3.AddType Application/octet-stream. mov4. Omit WWW prefixesOne of the principles of SEO is to make sure that your site has only one URL. Therefore, you need to turn all the access through the WWW to non-www, or reverse this.1.RewriteEngine on2.RewriteBase/3.RewriteCond%{http_host} ^www.aqee.net [NC]4.RewriteRule ^ (. *) $ http://aqee.net/$1 [l,r=
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.