任何人都可以帮我创建mod_rewrite规则吗?请...
默认网址= http://domain.com/check.php?host=google.com
使用mod_rewrite = http://domain.com/google.com
答案 0 :(得分:0)
试试这个:
RewriteEngine On
#Skip existent dirs
RewriteCond %{REQUEST_FILENAME} !-d
#Skip existent files
RewriteCond %{REQUEST_FILENAME} !-f
#Rewrite /foo to /check.php?host=foo
RewriteRule ^(.*)$ /check.php?host=$1 [NC,L]