http-host

Apache proxy to Lighttpd: changing $_SERVER['HTTP_HOST'] in php

I have a WordPress blog running on lighttpd-1.4.19, listening at www00:81. On the same host, apache-2.2.11 listens on port 80, which creates a proxy connection from http://blog.mydomain.org:80 to http://blog.mydomain.org:81 (both being the same physical machine). The Apache virtualhost looks as follows: <VirtualHost *:80> ServerNam...

Apache mod_rewrite: explain me %{HTTP_HOST} expecially when using addon domains

Apache mod_rewrite: explain me %{HTTP_HOST} expecially when using addon domains Situation (directories tree) on an Apache server with addon domains: main-domain.com/ | |_ .htaccess (just an empty file, no rule in here) |_ index.html (shown when accessing http://main-domain.com) | |_ addon-domain-1.com/ | | | |_ .htaccess | |_...

PHP HTTP_HOST subdomain extraction given that a subdomain be a wildcard and contain more than one '.'

I'm trying to extract the subdomain from the HTTP_HOST value. However I've stumbled into a problem where if the subdomain has more than one dot in it it fails to match properly. Given that this is a script to run on multiple different domains and it could have an unlimited amount of dots, and the tld could be either 1 or 2 parts (and any...

get the host the user is coming from

hi, i wanted to know in python how can i get the host the user came from? how do i extract it? i tried this: host = self.request._environ['HTTP_HOST'] but it's empty... Do you have any idea what it should be Thanks. ...

How to make 'www' optional in a Hostname Route in Zend ?

Hello, Let's say I have the domain "example.com" I would like to add a route such as when the URL is "example.com/whatever/follows" it redirects to "http://www.example.com/whatever/follows" (forwarding the query strings too). Basically I would like to translate into Zend the following Apache Rewrite rule: RewriteCond %{HTTP_HOST} ^exa...

Reliability of php HTTP_HOST & HTTP_REFERER for critical task

I'm going to develop a website in PHP. But not sure if the method i'm going to use is the best approach. There will be many addon domains for the same site. But content will be filtered based on the domain used to visit the site. For Example If a user comes from the domain siteusa.com then the content will be shown filtered accordingly ...

mod_rewrite - failing on HTTP host condition

Hi All, I'm trying to do some URL rewriting - but for some reason it's not working as I expected (I've probably missed something really simple!). I have two sites - www.domain.local and admin.domain.local. Using the below .htaccess file, the public site rewriting is fine, but the admin site isn't working as expected, as it is being pic...