⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 redirect.8

📁 MiniWeb 在嵌入式平台上运行的WEB源代码
💻 8
字号:
.TH redirect 8 "23 September 1995".SH NAMEredirect - simple redirection CGI program.SH SYNOPSIS.B redirect.SH DESCRIPTION.PPThree steps to set up a redirection:.PP1. Make sure your web server is set up to allow CGI programs..PP2. Make a symbolic link from the file or directory you want to redirect,pointing at this program in the CGI bin directory..PP3. Add an entry to the file ".redirects" in the directory where yourhttp server runs CGI programs.  For most servers, this is thedirectory where the given CGI program lives.  The format of thefile is a bunch of lines with a filename, whitespace, and the newURL.  For example:.nf  /test/oldfile.html    http://www.acme.com/test/newfile.html.fiThe easiest way to figure out precisely what filename to put into .redirectsis to set up the symlink and then click on it.You'll get back a "404 Not Found" page which includes the filenameas received by the redirect program, and that's what you want to use..PPYou can also add a wildcard specification to redirect whole groups of files.For example:.nf  /wildtest/*          http://www.acme.com/test-.fiwill cause an access to the /wildtest/somefile.html to be redirected tohttp://www.acme.com/test-somefile.html. (Note that the asterisk need notbe preceded by a slash.).PPNote: this is designed for thttpd (http://www.acme.com/software/thttpd/)and using it with other web servers may require some hacking.  A possiblegotcha is with the symbolic link from the old file pointing at thisscript - servers other than thttpd may not allow that link to be runas a CGI program, because they don't check the link to see that itpoints into the allowed CGI directory..SH "SEE ALSO"thttpd(8).SH "BUGS / DEFICIENCIES".PPIt would be really cool to have this program look forthe .redirects file in the same directory as the file being redirected,instead of in the binaries directory.  Unfortunately, this appearsto be impossible with the information CGI gives, plus the non-standardizedbut widespread practice of running CGI programs in the directory wherethe binary lives.  Perhaps CGI 1.2 will address this..PPThe wildcard mechanism is very primitive.In particular, any characters that follow the asterisk are blithelyignored..SH AUTHORCopyright 

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -