0

我正在尝试替换链接,但以内部服务器错误结束

www.domain.com/profile.php?id=1 

我想要它->

www.domain.com/1

.htaccess

RewriteEngine on

RewriteCond %{HTTP_HOST} ^www\.domain\.com$
RewriteRule ^login\.php\/?(.*)$ "http\:\/\/domain\.com\/$1" [R=301,L]

RewriteRule ^([^/]*)$ /profile.php?id=$1 [L]
4

1 回答 1

1

您只需要使用此代码:

RewriteEngine on
RewriteRule ^([0-9]+)$ /profile.php?id=$1 [L]
于 2013-07-15T04:52:59.477 回答