Reputation: 1
I am trying to replace link but ending with internal server error
www.domain.com/profile.php?id=1
i want it to ->
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]
Upvotes: 0
Views: 33
Reputation: 7073
You just have to use this code :
RewriteEngine on
RewriteRule ^([0-9]+)$ /profile.php?id=$1 [L]
Upvotes: 1