16. htaccess file setting skills unknown to programmers
Reproduced original address: http://www.jb100.net/html/content-22-741-1.htmlThe. htaccess file is a very powerful configuration file of the Apache Web server. for this file, Apache has
Enable nginx support in Centos. the htaccess file implements pseudo-static search methods. many people say nginx does not support this method currently. I tried the htaccess file according to the nginx rules and found that nginx is fully supported.
Provides various official and user-released code examples. For code reference, you are welcome to share and learn 16. htaccess file setting skills.
Reproduced original address: http://www.jb100.net/html/content-22-741-1.html
The. htaccess file is a
The Mode Rewrite module of Apache provides a Rewrite engine based on regular expression analyzer to Rewrite URL requests in real time.
Manager Introduction
Apache module mod_rewriteDescribes an engine for real-time URL rewriting requests based on
The Apache mode rewrite module provides a rewrite engine based on the regular expression parser to rewrite URL requests in real time. In most cases, it is used in conjunction with the. htaccess file. For example, the URL of this article
. Special note by htaccess
* Enable. htaccess, you need to modify httpd.conf, enable allowoverride, and you can use allowoverride to restrict the use of specific commands
* If you need to use a filename other than. htaccess, you can use the
Source: http://www.ido321.com/1123.htmlToday get a trick: Use the. htaccess file to perform pseudo-static processing of a PHP Web site or file.First, check whether the server supports pseudo-static processing:You must have space support Rewrite and
htAccess files (hypertext Access file) is a very powerful configuration file for Apache Web servers, and for this file, Apache has a bunch of parameters that allow you to configure almost any function you want.Use. htaccess block search engine
ThinkPHP uses the Rewrite rules of the. htaccess file to hide index. php in the URL and remove index. php from the URL.
ThinkPHP, as a PHP framework, is a single portal, so its original URL is not so friendly. However
ThinkPHP provides various
Open the httpd. conf file and use a text editor to find The code is as follows:Copy code Options FollowSymLinksAllowOverride NoneChanged:Options FollowSymLinksAllowOverride All However, I did not find Options FollowSymLinks or other things in
Source: http://www.ido321.com/1123.html
Today get a trick: Use the. htaccess file to perform pseudo-static processing of a PHP Web site or file.
First, check whether the server supports pseudo-static processing:
You must have space support
. htaccess set the order of the site's default home page
Add the following line to the. htaccess file:
The code is as follows
Copy Code
DirectoryIndex index.html index.htm index.php
Htaccess set 404 Error page
Original address: http://www.zoneself.org/2012/02/10/content_235.html
Many Linux hosts in the country are not enabled by default. htaccess, resulting in no support for pseudo static. And the foreign virtual host is basically support this service, I
The Apache mode rewrite module provides a rewrite engine based on the regular expression parser to rewrite URL requests in real time. In most cases, it is used in conjunction with the. htaccess file. For example, the URL of this article
Detailed description of the. htaccess Rewrite rulesAuthor Freemouse July 22, 2010With Apache virtual host a lot of friends, Apache provides. The htaccess module can set rewrite rules for each virtual host, which is useful for SEO optimization of the
. htaccess files (hypertext Access file) is a very powerful configuration file for Apache Web servers, and for this file, Apache has a bunch of parameters that allow you to configure almost any function you want. htaccess Configuration files adhere
turn from: http://www.cnblogs.com/banruo/archive/2010/11/02/1867536.htmlBecause I was configured with Wampserver, using the thinkphp framework, found no transport. htaccess, very bad use Ah, and then I use the first step to restart Apache success,
What is htaccess
The htaccess file (or distributed configuration file) provides a way to configure changes to the directory, that is, to place a file containing one or more directives in a specific document directory to function in this directory
Remove the index.php from the URLThinkphp as a PHP framework, is a single entry, then its original URL is not so friendly. But thinkphp provides a variety of mechanisms to customize the desired URL format, in conjunction with Apache. htaccess files,
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.