Forum Moderators: phranque

Message Too Old, No Replies

how to change subdomain with different link

         

vikasA

11:37 am on Oct 11, 2007 (gmt 0)

10+ Year Member



Hi!

Q. I want to create subdomain, which should be change dynamiclly.
I have a link
www.example.com/vishw/index.php?subgrp=1&state=Alabama

i want to change above link as like:-
www.Alabama.example.com/vishw/

please any one help me that how is it possible.
please give me solution in detail and step-vise.

thanks & regards
Vikas

[edited by: jdMorgan at 12:19 pm (utc) on Oct. 11, 2007]
[edit reason] example.com [/edit]

jdMorgan

12:02 am on Oct 17, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Change the links that appear on your pages to the format that you want users to see and search engines to index. PHP's preg_replace is often helpful in this regard.

Then add mod_rewrite code on your server to recognize the new URL format requests, and translate them back into the form needed to invoke the script on your server.

More details here [webmasterworld.com].

Jim