apache and mod_rewrite
-
hi all, i need help with my website. i've got a few subdomains that show files in the /public_html/subdomain directory. so something.mydomain.com shows files in mydomain.com/something. does anyone know of a way to make something.mydomain.com show files in mydomain.com/anything/somethingelse? i don't want to use redirects, i want something.mydomain.com/foo.php to stay in the client's address bar but show mydomain.com/anything/somethingelse/foo.php. i've asked on 2 different newsgroups but haven't gotten any solutions. i don't even know if this is possible. does anyone have any suggestions? thanks in advance, sam kline
-
hi all, i need help with my website. i've got a few subdomains that show files in the /public_html/subdomain directory. so something.mydomain.com shows files in mydomain.com/something. does anyone know of a way to make something.mydomain.com show files in mydomain.com/anything/somethingelse? i don't want to use redirects, i want something.mydomain.com/foo.php to stay in the client's address bar but show mydomain.com/anything/somethingelse/foo.php. i've asked on 2 different newsgroups but haven't gotten any solutions. i don't even know if this is possible. does anyone have any suggestions? thanks in advance, sam kline
-
hi all, i need help with my website. i've got a few subdomains that show files in the /public_html/subdomain directory. so something.mydomain.com shows files in mydomain.com/something. does anyone know of a way to make something.mydomain.com show files in mydomain.com/anything/somethingelse? i don't want to use redirects, i want something.mydomain.com/foo.php to stay in the client's address bar but show mydomain.com/anything/somethingelse/foo.php. i've asked on 2 different newsgroups but haven't gotten any solutions. i don't even know if this is possible. does anyone have any suggestions? thanks in advance, sam kline
Yes, it's possible...I did this just the other day... Under linux, you need to edit your HOSTS file and point sub.domain.com to localhost or whatever IP or address you have assigned. Then I modified httpd.conf and added two seperate The first one is the primary (www.domain.com) and is used whenever no other subdomain is provided... The second or more are the sub-domain entries Each of the allow you to map sub-domains to any directory you wish... No mod_rewrite required :P
It's frustrating being a genius and living the life of a moron!!!