[PHP] Please dirrect me -- headers ????
This isn't necessarily PHP specific, but I'm looking for more information on HTTP headers. I'd like to know what headers I should send and why. I want my code to send out w3c compliant HTML. I'm confused on exactly what headers do, and the difference between HTTP headers and information contained within the HEAD tag. Multiple google searches have gotten me only more confused. Someone please send me in the right direction :) on an a possible similar note, I have a domain name www.mydom1.com and when the user goes to it, I want it so say www.mydom.com in the browser address bar. Can I do this by sending certain headers? (I have both domains pointing to the same server) ... should/could I do something like this through PHP or is there something I can set in Apache to do the same thing? Simply confused, - Anthony -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Please dirrect me -- headers ????
Hi, Headers have nothing to do with the head tag, the headers are sent before the html page, ie they are not part of the html document, but something sent by the web server before the page is sent to the user Try: http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html And http://www.cs.tut.fi/~jkorpela/http.html As for question 2, if you want to redirect the user to the other website use the location header to redirect them to the other site (otherwise you'll have to redirect them to the other site, then use frames to open the content on the original site) On 14/7/03 5:16 pm, Anthony [EMAIL PROTECTED] wrote: This isn't necessarily PHP specific, but I'm looking for more information on HTTP headers. I'd like to know what headers I should send and why. I want my code to send out w3c compliant HTML. I'm confused on exactly what headers do, and the difference between HTTP headers and information contained within the HEAD tag. Multiple google searches have gotten me only more confused. Someone please send me in the right direction :) on an a possible similar note, I have a domain name www.mydom1.com and when the user goes to it, I want it so say www.mydom.com in the browser address bar. Can I do this by sending certain headers? (I have both domains pointing to the same server) ... should/could I do something like this through PHP or is there something I can set in Apache to do the same thing? Simply confused, - Anthony Ryan Gibson --- [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Please dirrect me -- headers ????
Thanks for the links, I'm going through them now as far as the location thing. I don't acutaly want to send the user to a different site, I just want to change what apears in the user's address bar. in my example, both www.mydom1.com and www.mydom.com point to the same site and weberver. It's simply that one is the old address, and I want users to see teh new address, even if they type in the old one. - Anthony Ryan Gibson [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hi, Headers have nothing to do with the head tag, the headers are sent before the html page, ie they are not part of the html document, but something sent by the web server before the page is sent to the user Try: http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html And http://www.cs.tut.fi/~jkorpela/http.html As for question 2, if you want to redirect the user to the other website use the location header to redirect them to the other site (otherwise you'll have to redirect them to the other site, then use frames to open the content on the original site) On 14/7/03 5:16 pm, Anthony [EMAIL PROTECTED] wrote: This isn't necessarily PHP specific, but I'm looking for more information on HTTP headers. I'd like to know what headers I should send and why. I want my code to send out w3c compliant HTML. I'm confused on exactly what headers do, and the difference between HTTP headers and information contained within the HEAD tag. Multiple google searches have gotten me only more confused. Someone please send me in the right direction :) on an a possible similar note, I have a domain name www.mydom1.com and when the user goes to it, I want it so say www.mydom.com in the browser address bar. Can I do this by sending certain headers? (I have both domains pointing to the same server) ... should/could I do something like this through PHP or is there something I can set in Apache to do the same thing? Simply confused, - Anthony Ryan Gibson --- [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Please dirrect me -- headers ????
Cant you edit the httpd.conf? I know there might be plenty of reasons why not to...but im just checking. =) Server mydom1.com Alias mydom.com Anthony [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Thanks for the links, I'm going through them now as far as the location thing. I don't acutaly want to send the user to a different site, I just want to change what apears in the user's address bar. in my example, both www.mydom1.com and www.mydom.com point to the same site and weberver. It's simply that one is the old address, and I want users to see teh new address, even if they type in the old one. - Anthony Ryan Gibson [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hi, Headers have nothing to do with the head tag, the headers are sent before the html page, ie they are not part of the html document, but something sent by the web server before the page is sent to the user Try: http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html And http://www.cs.tut.fi/~jkorpela/http.html As for question 2, if you want to redirect the user to the other website use the location header to redirect them to the other site (otherwise you'll have to redirect them to the other site, then use frames to open the content on the original site) On 14/7/03 5:16 pm, Anthony [EMAIL PROTECTED] wrote: This isn't necessarily PHP specific, but I'm looking for more information on HTTP headers. I'd like to know what headers I should send and why. I want my code to send out w3c compliant HTML. I'm confused on exactly what headers do, and the difference between HTTP headers and information contained within the HEAD tag. Multiple google searches have gotten me only more confused. Someone please send me in the right direction :) on an a possible similar note, I have a domain name www.mydom1.com and when the user goes to it, I want it so say www.mydom.com in the browser address bar. Can I do this by sending certain headers? (I have both domains pointing to the same server) ... should/could I do something like this through PHP or is there something I can set in Apache to do the same thing? Simply confused, - Anthony Ryan Gibson --- [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Please dirrect me -- headers ????
--- Anthony [EMAIL PROTECTED] wrote: This isn't necessarily PHP specific, but I'm looking for more information on HTTP headers. I'd like to know what headers I should send and why. That is an admirable desire, and I wish more developers sought the same knowledge. You can learn more about HTTP by reading the RFC itself (RFC 2616, though several others describe extensions to the protocol), or you can get one of the few books on the topic. O'Reilly has a pocket reference for under $10, and I wrote one that is heavily slanted toward PHP developers called HTTP Developer's Handbook (http://httphandbook.org/). I want my code to send out w3c compliant HTML. This is a different matter altogether. HTML and HTTP are very different things. I'm confused on exactly what headers do, and the difference between HTTP headers and information contained within the HEAD tag. As mentioned above, HTTP and HTML are entirely different. The head tag is HTML. I think as soon as you look into HTTP and how it fits into the bigger picture, you will understand. You will also gain a deeper understanding about the difference between server-side and client-side scripts, how cookies really work, and things like that. Chris = Become a better Web developer with the HTTP Developer's Handbook http://httphandbook.org/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Please dirrect me -- headers ????
yes, I can edit the httpd.conf file. I'm looking in the Apache 2.0 docs and can't find the server directive. Also, to my knowledge and according to the docs, alias mydom.com is invalid. Alias URL-path file-path|directory-path is how the docs explain it. Am I missing something. If I can do this through Apache. it would probably be much simpler. - Anthony Apache 2.0.45 by the way :) Taylor York [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Cant you edit the httpd.conf? I know there might be plenty of reasons why not to...but im just checking. =) Server mydom1.com Alias mydom.com Anthony [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Thanks for the links, I'm going through them now as far as the location thing. I don't acutaly want to send the user to a different site, I just want to change what apears in the user's address bar. in my example, both www.mydom1.com and www.mydom.com point to the same site and weberver. It's simply that one is the old address, and I want users to see teh new address, even if they type in the old one. - Anthony Ryan Gibson [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hi, Headers have nothing to do with the head tag, the headers are sent before the html page, ie they are not part of the html document, but something sent by the web server before the page is sent to the user Try: http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html And http://www.cs.tut.fi/~jkorpela/http.html As for question 2, if you want to redirect the user to the other website use the location header to redirect them to the other site (otherwise you'll have to redirect them to the other site, then use frames to open the content on the original site) On 14/7/03 5:16 pm, Anthony [EMAIL PROTECTED] wrote: This isn't necessarily PHP specific, but I'm looking for more information on HTTP headers. I'd like to know what headers I should send and why. I want my code to send out w3c compliant HTML. I'm confused on exactly what headers do, and the difference between HTTP headers and information contained within the HEAD tag. Multiple google searches have gotten me only more confused. Someone please send me in the right direction :) on an a possible similar note, I have a domain name www.mydom1.com and when the user goes to it, I want it so say www.mydom.com in the browser address bar. Can I do this by sending certain headers? (I have both domains pointing to the same server) ... should/could I do something like this through PHP or is there something I can set in Apache to do the same thing? Simply confused, - Anthony Ryan Gibson --- [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Please dirrect me -- headers ????
On Tuesday 15 July 2003 03:33, Anthony wrote: yes, I can edit the httpd.conf file. I'm looking in the Apache 2.0 docs and can't find the server directive. Also, to my knowledge and according to the docs, alias mydom.com is invalid. Alias URL-path file-path|directory-path is how the docs explain it. Am I missing something. If I can do this through Apache. it would probably be much simpler. ServerAlias. But that's not going to do what you want. It will only effectively make www.example1.com and www.example2.com point to the same physical filesystem directory and thus make both domains appear the same, BUT the url on the user's browser will not change -- for that you're going to have to use a redirection header. -- Jason Wong - Gremlins Associates - www.gremlins.biz Open Source Software Systems Integrators * Web Design Hosting * Internet Intranet Applications Development * -- Search the list archives before you post http://marc.theaimsgroup.com/?l=php-general -- /* Food for thought is no substitute for the real thing. -- Walt Kelly, Potluck Pogo */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php