-2

I want to make my user profiles 'pretty' as it were. Here is the regular URL: site.com/user.php?user=Echo123 I want this to become: Echo123.site.com Please help :) Im a .htaccess newbie.

Gigi123
  • 5
  • 5

2 Answers2

0

You should contact your web hosting provider or go to your web console and Go To Domains->Your Domain->DNS->CNAME and input the subdomain Echo123.yourdomain.com then input the forwarding url yourdomain.com/user.php?user=Echo123

0

Try something like this:

RewriteEngine on
RewriteCond %{HTTP_HOST} ^(.*)\.example\.com
RewriteRule ^(.*)$ http://example.com/user.php?user=%1/$1 [L,NC,QSA]
Martin Adámek
  • 16,771
  • 5
  • 45
  • 64