Forum Moderators: phranque

Message Too Old, No Replies

.htaccess rewriting, subdomains & directories

         

JeNeSaisLaw

1:45 am on Jun 2, 2008 (gmt 0)

10+ Year Member



Hi everybody,

I hope somebody can help me. I have been reading these forums over the last few weeks and haven't had any success with the suggestions. As such, I've decided to register and see if I can get some specific help. This is my first foray into mod rewriting and I am trying to do it through the .htaccess file.

Here is what I want to do:

Check if there is a subdomain present.
_____Check if the subdomain is one of my reserved subdomains (boards, groups, my, news, guide, portal, www)
__________If it is, load index.php?l=(subdomain) (Then do something to handle further variables, because there will be)
__________If it is not, load index.php?l=school&school=(subdomain) (Then do something to handle further variables, because there will be)

Check If no subdomain is present.
_____Route first thing after example.com/ to index.php?l=user&user=(firstThingAfterExample.com) (Then do something to handle further variables, because there will be)

guide.example.com/oci should route to example.com/index.php?l=guide&s=oci

yale.example.com should reroute to example.com/index.php?l=schools&school=yale

example.com/JeNeSaisLaw should reroute to index.php?l=user&user=JeNeSaisLaw

Thanks for any help anybody can provide!

JNSL

jdMorgan

3:54 pm on Jun 2, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Hi JNSL,

Welcome to WebmasterWorld!

Please review our Apache Forum Charter [webmasterworld.com] for information on how to get the most from this forum.

Thanks,
Jim

JeNeSaisLaw

6:41 pm on Jun 3, 2008 (gmt 0)

10+ Year Member



Hi,

I have reviewed the charter and extensively looked through the forum for help on this subject, but have thus far found unsatisfactory results. Perhaps you could be so kind as to help me with this issue.

Thanks in advance Jim.

[edited by: JeNeSaisLaw at 6:41 pm (utc) on June 3, 2008]