Apache Rewrite规则可以通过配置文件进行编写,以下是一些基本的Rewrite规则示例:
RewriteEngine On
RewriteCond %{HTTP_HOST} ^example.com [NC]
RewriteRule ^(.*)$ http://www.example.com/$1 [L,R=301]
RewriteEngine On
RewriteCond %{HTTP_HOST} ^www.example.com [NC]
RewriteRule ^(.*)$ http://example.com/$1 [L,R=301]
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME}\.html -f
RewriteRule ^(.*)$ $1.html
RewriteEngine On
RewriteRule ^product/([0-9]+)/?$ product.php?id=$1 [L]
以上是一些基本的Rewrite规则示例,具体的规则需要根据实际需求进行编写。