htaccess RewriteRule 500错误循环


htaccess RewriteRule 500 error - loop

问题很简单我想重写一下http://www.mydomain.com/test123.com就像http://www.mydomain.com/details.php?domain=test123.com

RewriteRule ^([^/]*)$ /details.php?domain=$1 [L]

谢谢。

为您的重写URL。您可以使用以下.htaccess

RewriteEngine On
RewriteCond %{REQUEST_URI} !^/(index.php)?$ 
RewriteCond %{REQUEST_URI} !^/details.php$ 
RewriteRule ^(.*)$ /details.php?domain=$1 [QSA,L]

http://www.mydomain.com/test123.com改写为http://www.mydomain.com/details.php?domain=test123.com