0
符號在htaccess中做了什麼。我從一個在線論壇爲htaccess挑選了一個代碼,他們使用|。我想了解這個符號在htaccess中意味着什麼,如果根本不存在任何差異,htaccess中的符號是什麼以及它的功能
RewriteEngine on
#
### Disallow Image Hotlinking
RewriteCond %{HTTP_REFERER} .
RewriteCond %{HTTP_REFERER} !^http://www\.example\.net
RewriteRule \.(jpe?g¦gif¦bmp¦png)$ - [F]
#
### Externally redirect to remove ".php" if the user adds it
RewriteCond %{THE_REQUEST} ^GET\ /([^/]+/)*[^.]+\.php(\?[^\ ]*)?\ HTTP/
RewriteRule ^(([^/]+/)*[^.]+)\.php$ http://www.example.net/$1 [R=301,L]
#
### Externally redirect to remove double slashes
RewriteCond %{REQUEST_URI} ^(.*)//(.*)$
RewriteRule . http://www.example.net/%1/%2 [R=301,L]
#
### Externally redirect to remove trailing slash
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.+)/$ http://www.example.net/$1 [R=301,L]
#
### Externally redirect non-canonical hostname requests to canonical
### domain (if not already done by one of the preceding rules)
RewriteCond %{HTTP_HOST} !=www.example.net
RewriteRule ^(.*)$ http://www.example.net/$1 [R=301,L]
#
### Internally rewrite requests for URLs which do not resolve
### to physically-existing files or directories to a PHP file
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ $1.php [L,QSA]
感謝您驗證此信息。 – Solo 2013-02-11 19:45:55