htaccess subdomain redirct with last url parameter

Posted by Pankaj on Stack Overflow See other posts from Stack Overflow or by Pankaj
Published on 2009-07-15T18:29:47Z Indexed on 2010/05/08 7:38 UTC
Read the original article Hit count: 178

Filed under:
|
|

I want to write a .htaccess file for redirecting my subdomains and URL's last variable to a new location. Here is what I want to do:

http(s)://abc.example.com/books

I want my internal URL to be like:

http://example.com/?name=abc&type=books

I have already gotten the subdomain redirect to work but I am not able to do subdomain with variable in last part of URL.

How can I accomplish this?

© Stack Overflow or respective owner

Related posts about .htaccess

Related posts about subdomain