Forum Moderators: phranque

Message Too Old, No Replies

Redirect subdomain to a PHP script with parameters

         

bastek

8:09 pm on Sep 28, 2003 (gmt 0)

10+ Year Member



Hi all. I'm new to webmastering. I just started my first php site.

Need to redirect subdomains to a PHP script with parameters, like subdomain.example.com -> www.example.com/artists.php?id=3.

Is there a way to do it in .htaccess? I have asked my provider, but he told me it's not! I don't believe so asking the professionals.

[edited by: heini at 8:14 pm (utc) on Sep. 28, 2003]
[edit reason] please, no urls, thanks! [/edit]

DaveAtIFG

9:11 pm on Sep 28, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Welcome to WebmasterWorld bastek! :)

Of course it can be done. But first, please review the Charter [webmasterworld.com] for this forum. In particular:

This is not the Apache mod_rewrite support desk! PLEASE do your homework before posting a mod_rewrite question. We prefer to limit discussions to mod_rewrite aspects not already covered. For beginners, an introduction to Apache redirects and mod_rewrite is available here [webmasterworld.com].

Read and learn a little. Then post your code and questions and our regulars are usually happy to help.