Three apache Rewrite url configuration methods
Solution 1: the easiest way to configure Apache
URI effect: php tutorial/subject/4843637/"> http://movie.example.com/index.php/subject/4843637/
Case: MediaWiki
Todo
Solution 2: Configure Apache URL rewrite and redirect to index. php with Parameters
URI effect: http://movie.example.com/subject/4843637/
Case: MediaWiki
Todo
Solution 3: Configure Apache URL rewrite and redirect to index. php without Parameters
URI effect: http://movie.example.com/subject/4843637/
Todo
Document: Two Methods for configuring Apache URL rewrite
1. htaccess file (do not restart Apache)
Applicable to: cases where Apache cannot be restarted, such as virtual hosts
Step: Enable AllowOverride All in Apache conf (virtual hosts are generally enabled ),
Write RewriteRule into the. htaccess file and put it in the web Access Directory.
2. Apache conf (restart Apache)
Applicability: VPS and other cases where Apache can be restarted
Step: Write RewriteRule to the httpd. conf or httpd-vhosts.conf File
PS:
When I remembered that at school, on the Web Hosting, I couldn't restart Apache. I wanted to configure rewrite and I couldn't find many books in the library. Later, I learned about. htaccess on the Internet, but it has not been recorded.
Later, the project was always configured with Apache conf. A few days ago, my colleague asked me: if Apache is not configured, why can I use a slash/TO PASS Parameters like index. php/id/123 /.