Forum Moderators: phranque

Message Too Old, No Replies

problem in URL redirection through .htaccess

.htaccess, redirect, virtual domain

         

dani_syed

9:46 am on Jan 21, 2008 (gmt 0)

10+ Year Member



Hi all :)
i have a problem in URL redirection through .htaccess
well other redirections are working properly, but i cant get a way to redirect one url.
that is:

i have a url like this, "www.example.com/user/index.php?user=dani"

and i want to make this URL, looks like "www.name.example.com"

so can someone please tell me how to do this?

[edited by: engine at 11:26 am (utc) on Jan. 21, 2008]
[edit reason] examplified [/edit]

Marcia

9:53 am on Jan 21, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



How are you doing the other redirects that are working? Are you using mod_rewrite for them, and do they also have a query string in the URL?

dani_syed

10:25 am on Jan 21, 2008 (gmt 0)

10+ Year Member



well i am using .htaccess for all redirects
for example i have used like this:

RewriteEngine on
RewriteRule ^user/signin/ /www.example.com/signin/index.php?Action=singnin

as this is simple redirection, and i am not facing any sort of issues in this, but i want to redirect something url
as i stated above.
that is i want to show user proile, and in my php coding i use this url to show user profile:
www.example.com/user/index.php?id=name

but now i want to remove all this? and index.php from my URL and i want it to be like this, www.name.example.com
where name is user name.

so plz do tell me the simplest way to achieve this functionality.

[edited by: engine at 11:27 am (utc) on Jan. 21, 2008]
[edit reason] examplified [/edit]