Forum Moderators: phranque

Message Too Old, No Replies

rewrite to subdomains problem

how step to set up it?

         

icyleaf

11:46 am on Nov 5, 2008 (gmt 0)

10+ Year Member



Hi, all :)

i'm a new guy to htaccess file. i just want rewrite www.example.com/blog (or example.com) to blog.example.com.

but try many times and faild...

how rewrite to it?

Thank in advance!

jdMorgan

3:52 pm on Nov 5, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Hi Icyleaf, and welcome to WebmasterWorld!

This is a fairly common question -- Have you tried searching WebmasterWorld [webmasterworld.com] for "rewrite subdomain to subdirectory"?

Try that search, then post your best-effort code as a basis for discussion. Also, our Apache Library [webmasterworld.com] contains several tutorials, and our Apache Forum Charter [webmasterworld.com] includes several links to useful information, and some tips on how to get the most from this forum.

Thanks,
Jim

icyleaf

6:45 am on Nov 6, 2008 (gmt 0)

10+ Year Member



@jdMorgan
all the thanx :)

because my english is poor, may be i don't know the keywords or how to describe my problem.

hum, may be i describe my problem above had some wrong way with your answer, go into deep, the url:
www.example.com/blog means a method or not directory, it also be www.example.com/index.php/blog.

icyleaf

6:53 am on Nov 6, 2008 (gmt 0)

10+ Year Member



Wooow, i found the keywords: "rewrite subdomain to variable".