更新时间:2023-11-30 23:20:58
这些被称为 RewriteRule
s,它们非常简单:
These are known as RewriteRule
s, and they are fairly straightforward:
RewriteEngine on
RewriteRule ^about$ /index.php?app=about
就使其更通用而言,如何处理:
As far as making it more generic, how about this:
RewriteEngine on
RewriteRule ^([A-Za-z]+)$ /index.php?app=$1
这会将对/staff或/contact之类的任何请求重定向到index.php?app = [staff | contact]
This will make any request to something like /staff or /contact redirect to index.php?app=[staff|contact]