Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
Categories as subdomains
ImWithStupid
New
Anyone have an idea of how to use subdomains for the different categories?
Such as:
example.com/categories/general/ to
general.example.com
It seems it's not straightforward to do, since there is no actual directories named "categories" or "general".
Thanks for the help.
Such as:
example.com/categories/general/ to
general.example.com
It seems it's not straightforward to do, since there is no actual directories named "categories" or "general".
Thanks for the help.
Tagged:
0
Best Answer
-
Linc AdminThis is a complex task that I think is a bit beyond what I'd expect to be explained on a message board. This will minimally require knowledge of Apache virtual hosts and probably mod_rewrite and advanced Vanilla work. My initial reaction (having a good deal of experience in adventures like this) is "this is far more trouble than it is worth."0
Answers
2) Configure apache thus that it will accept all requests for IP-address (not virtual, but the real host)
3) In PHP you can parse $_SERVER['HTTP_HOST'] and get requested subdomain.
4) Redispatch event with new REQUEST_URI (faked), 'BeforeDispatch' is good place for it.
Example (plugin function, or application hooks):