ag3nt42 Posted August 3, 2008 Share Posted August 3, 2008 can anyone help me with 301 redirects.. Say my domain is mysite.com well I have a mail server on that site so I want mail.mysite.com to point to mysite.com/maildirectory.. can anyone explain how I can do that? thanks very much, ag3nt42 Quote Link to comment https://forums.phpfreaks.com/topic/117965-help-with-301-redirects/ Share on other sites More sharing options...
webref.eu Posted August 3, 2008 Share Posted August 3, 2008 Not quite sure, but just wanted to say, does the domain's MX record, which controls the mailserver location through the DNS system, come into play here? Rgds Quote Link to comment https://forums.phpfreaks.com/topic/117965-help-with-301-redirects/#findComment-606841 Share on other sites More sharing options...
ag3nt42 Posted August 3, 2008 Author Share Posted August 3, 2008 well I have MX records setup with my DNS to take care of the actual mail server.. but what I want to do is.. when users type in mail.mysite.com I want to display a webmail client. So they can get their mail without having to use a pc client. the problem is that my DNS will not allow me to add mail.mysite.com >points> myIP/maildirectory so my only other option is something like 301 .. as far as I kno ne ways Quote Link to comment https://forums.phpfreaks.com/topic/117965-help-with-301-redirects/#findComment-606847 Share on other sites More sharing options...
trq Posted August 3, 2008 Share Posted August 3, 2008 Can you not create subdomains on your hosting? Most shared hosts allow a subdomain such as mail.foo.com to point to foo.com/mail Quote Link to comment https://forums.phpfreaks.com/topic/117965-help-with-301-redirects/#findComment-606893 Share on other sites More sharing options...
ag3nt42 Posted August 4, 2008 Author Share Posted August 4, 2008 no i had an argument with them over this and they tell me there DNS is not capable. Quote Link to comment https://forums.phpfreaks.com/topic/117965-help-with-301-redirects/#findComment-607109 Share on other sites More sharing options...
ag3nt42 Posted August 4, 2008 Author Share Posted August 4, 2008 no see I host my own server.. they are simply the DNS. Quote Link to comment https://forums.phpfreaks.com/topic/117965-help-with-301-redirects/#findComment-607110 Share on other sites More sharing options...
ag3nt42 Posted August 4, 2008 Author Share Posted August 4, 2008 is there not a way to do this or..? Sory to whine but I've already told you they will not do it.. So can I do it this way or not. And if I can, will anyone please show me. Thanks ~ag3nt42 Quote Link to comment https://forums.phpfreaks.com/topic/117965-help-with-301-redirects/#findComment-607112 Share on other sites More sharing options...
trq Posted August 4, 2008 Share Posted August 4, 2008 If you host your own server then simply setup another vhost. Quote Link to comment https://forums.phpfreaks.com/topic/117965-help-with-301-redirects/#findComment-607123 Share on other sites More sharing options...
trq Posted August 4, 2008 Share Posted August 4, 2008 Of course you will also need a CNAME DNS record to go with it. Quote Link to comment https://forums.phpfreaks.com/topic/117965-help-with-301-redirects/#findComment-607126 Share on other sites More sharing options...
ag3nt42 Posted August 5, 2008 Author Share Posted August 5, 2008 so can i not do this with 301 redirect or ...? Maybe I'm not explaining this clear enough: I have my own server. I do not have my own DNS server. My domain name is registered through Register.com They will NOT let me add subdomains. I want for: mail.mysite.com //TO SPECIFY THIS NAME ALREADY EXISTS I DO NOT NEED TO CREATE IT to take users to: myServer/maildirectory I'm pretty sure if I was to setup a new Vhost then I would also have to set it up on another port my DNS will not allow me to specify ports either. Can somone just tell me strait up if I can do this with 301 or not.. I've read alil bit about 301 and 302 redirects and from what I read it seems this can be done.. but I'm very unsure on the syntax for it. Sposedly if users go to mysite.com and my new site is .. mynewsite.com you can use 301 redirect to send users there.. So if users come to mail.mysite.com can I not also send them to a specific place from there say mysite.com/maildirectory but then would the address still say mail.mysite.com or would it now say mysite.com/mail? Quote Link to comment https://forums.phpfreaks.com/topic/117965-help-with-301-redirects/#findComment-608620 Share on other sites More sharing options...
trq Posted August 5, 2008 Share Posted August 5, 2008 My domain name is registered through Register.com They will NOT let me add subdomains. If you can't add subdomains via dns (which I find VERY hard to believe) then you are totally out of luck anyway, because no matter what your do whatever.yourdomain.com will never get to your server. I'm pretty sure if I was to setup a new Vhost then I would also have to set it up on another port Pretty sure? Incorrect. Why do you keep looking at redirects when it is obvious vhosts are your solution? Seriosuly, if your running your own server you should know this stuff. I expect you back soon asking how your server may have become comprimised. Quote Link to comment https://forums.phpfreaks.com/topic/117965-help-with-301-redirects/#findComment-608639 Share on other sites More sharing options...
ag3nt42 Posted August 5, 2008 Author Share Posted August 5, 2008 what? I'm sory but I have no clue what your talking about. and whatever.mysite.com already does point to my IP Quote Link to comment https://forums.phpfreaks.com/topic/117965-help-with-301-redirects/#findComment-608757 Share on other sites More sharing options...
ag3nt42 Posted August 5, 2008 Author Share Posted August 5, 2008 I can setup whatever.mysite.com > IP //CAN DO no problem through register.com but i can only point it to my IP not a directory or a port whatever.mysite.com > IP/DIRECTORY ///CAN"T DO whatever.mysite.com > IP:PORT //CAN"T DO Quote Link to comment https://forums.phpfreaks.com/topic/117965-help-with-301-redirects/#findComment-608762 Share on other sites More sharing options...
ag3nt42 Posted August 5, 2008 Author Share Posted August 5, 2008 only way they say I can do it is if I have a different IP which I find absolutley ridiculous what will it take to find out how I can do this? I mean if I was phpfreaks.com and I want phpfreaks.com to take users to phpfreaks.com/forum how would I do this? aside from the obvious meta redirection.. I want the domain to stay at phpfreaks.com but it take phpfreaks.com to phpfreaks.com/forum I really didn't think this would turn into a whole network rewrite Quote Link to comment https://forums.phpfreaks.com/topic/117965-help-with-301-redirects/#findComment-608764 Share on other sites More sharing options...
ag3nt42 Posted August 5, 2008 Author Share Posted August 5, 2008 how is Vhost my solution??? VHOST: Also known as an Internet Presence Provider (IPP), Vhost is short for virtual host and is a remote host computer that is run and maintained by another company. By having another company or ISP run and maintain the computers that host the files, this enables an individual or company not to have to worry about the maintenance, setup, upgrade, or security of a computer or group of computers. I don't have any other server but one.. and I don't need to remote to it. And my server is not comprimised sry if this is disrepectful towards you.. but everything your saying to me right now.. sounds like its coming from a pyscho person. It makes no sense. Quote Link to comment https://forums.phpfreaks.com/topic/117965-help-with-301-redirects/#findComment-608771 Share on other sites More sharing options...
ag3nt42 Posted August 5, 2008 Author Share Posted August 5, 2008 are you talking about this?? IP-based virtual hosts ? Quote Link to comment https://forums.phpfreaks.com/topic/117965-help-with-301-redirects/#findComment-608780 Share on other sites More sharing options...
trq Posted August 5, 2008 Share Posted August 5, 2008 Im talking about name based virtual hosts. Its a major component of apache's configuration and allows you to host multiple domains from one server. eg; NameVirtualHost *:80 <VirtualHost> ServerName mydomain.com ServerAlias www.mydomain.com DocumentRoot /www/mydomain.com </VirtualHost> <VirtualHost> ServerName mail.mydomain.com DocumentRoot /www/mail.mydomain.com </VirtualHost> Quote Link to comment https://forums.phpfreaks.com/topic/117965-help-with-301-redirects/#findComment-608789 Share on other sites More sharing options...
ag3nt42 Posted August 5, 2008 Author Share Posted August 5, 2008 ok, well i kept getting a wrong definition for vhost then.. now your making some sense So how do i set this up.. say my structure is this mysite.com goes to: htdocs/ mail.mysite.com goes to: htdocs/mail/ also.. why would my server be comprimised? Quote Link to comment https://forums.phpfreaks.com/topic/117965-help-with-301-redirects/#findComment-608811 Share on other sites More sharing options...
trq Posted August 5, 2008 Share Posted August 5, 2008 also.. why would my server be comprimised? I wasn't saying your server is comprimised. Mearly pointing out the fact that if you are unaware of an apache configuration directive as straight forward and common as name based virtual hosts then it is likely that other areas of your servers configuration are not configured / vulnerable. iptables for instance is relatively alot more complex to configure than apache, yet it is your first line of defense when it comes to securing your system. I'll bet you can still login to your system as root too? Named based vhosts are covered in the apache manual here. Quote Link to comment https://forums.phpfreaks.com/topic/117965-help-with-301-redirects/#findComment-608837 Share on other sites More sharing options...
ag3nt42 Posted August 5, 2008 Author Share Posted August 5, 2008 hey don't be putting people down here now.. no cause for that.. Sory my mommy and daddy didn't pay for me to go to college I had to learn everything myself.. lil hard to get all the info when you get in pieces Quote Link to comment https://forums.phpfreaks.com/topic/117965-help-with-301-redirects/#findComment-608849 Share on other sites More sharing options...
ag3nt42 Posted August 5, 2008 Author Share Posted August 5, 2008 what can you tell me about electromagnetic induction?? ya kno.. aren't iptables for linux ne ways Quote Link to comment https://forums.phpfreaks.com/topic/117965-help-with-301-redirects/#findComment-608851 Share on other sites More sharing options...
trq Posted August 5, 2008 Share Posted August 5, 2008 Sory my mommy and daddy didn't pay for me to go to college I had to learn everything myself.. Sorry, but I left school when I was 16. I wasn't trying to have a dig at you, just assuming the worst. aren't iptables for linux ne ways Oh.. thats even more concerning. Windows is going to need a hell of alot more securing than Linux might. Quote Link to comment https://forums.phpfreaks.com/topic/117965-help-with-301-redirects/#findComment-608861 Share on other sites More sharing options...
ag3nt42 Posted August 5, 2008 Author Share Posted August 5, 2008 well then its a good thing we came across this aye.. Running XP HOME with apache 2.x and PHP5 I seldom leave any settings I know about at default.. This server is my personal server that I use to practice on and run my website. I was forced out of school my junior year.. got my GED in 4 days. honors GED I'm what I like to consider a jackOfAll Trades.. I paint cars and do autobody.. work on engines..I like to invent things.. I've worked construction jobs.. played sports for the better half of my life.. If it exists I've done it or am on my way to doing it. I am 21 btw 22 soon Quote Link to comment https://forums.phpfreaks.com/topic/117965-help-with-301-redirects/#findComment-608868 Share on other sites More sharing options...
ag3nt42 Posted August 5, 2008 Author Share Posted August 5, 2008 i'll be giving the virtual host a try once I get home. lol @work right now Quote Link to comment https://forums.phpfreaks.com/topic/117965-help-with-301-redirects/#findComment-608877 Share on other sites More sharing options...
ag3nt42 Posted August 5, 2008 Author Share Posted August 5, 2008 this part was really confusing me <VirtualHost> ServerName mydomain.com ServerAlias www.mydomain.com DocumentRoot /www/mydomain.com // and this here </VirtualHost> <VirtualHost> ServerName mail.mydomain.com DocumentRoot /www/mail.mydomain.com //this here </VirtualHost> But I got it working ne how by trying different combos finally got it working by say this instead DocumentRoot mypath/webmail //WITHOUT THE mail.mydomain.com.. that is what is so confusing about it.. and all the examples have this. but i did get it working.. thanks for the help thorpe.. Quote Link to comment https://forums.phpfreaks.com/topic/117965-help-with-301-redirects/#findComment-609051 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.