Three kinds of Apache Rewrite URL configuration methods
Scenario 1: Simplest, do not configure Apache
Uri Effect: PHP tutorial/subject/4843637/">http://movie.example.com/index.php/subject/4843637/
Case: MediaWiki
Todo
Scenario 2: Configure Apache URL rewrite, redirect to index.php, with parameters
Uri Effect: http://movie.example.com/subject/4843637/
Case: MediaWiki
Todo
Scenario 3: Configure Apache URL rewrite, redirect to index.php, no parameters
Uri Effect: http://movie.example.com/subject/4843637/
Todo
Data: Two ways to configure Apache URL rewrite
1. htaccess file (do not restart Apache)
Scope of application: Virtual host, such as unable to restart Apache situation
Step: Open the allowoverride all in Apache Conf (the virtual host is generally open),
Write the Rewriterule to the. htaccess file and place it in the Web Access directory.
2, Apache Conf (restart Apache)
Scope of application: VPS, etc. can restart Apache situation
Step: Write Rewriterule to httpd.conf or httpd-vhosts.conf files
Ps:
Remember to come to school, in the virtual host (Web Hosting), can not restart Apache, want to configure rewrite, went to the library to turn a lot of books have not been found. Later on the internet to learn. htaccess, has not been recorded.
Later the project was always with Apache Conf. A few days ago my colleague asked me: "Not Configured Apache, why can use the slash/pass parameters, like index.php/id/123/."