vymaz PHP Sessions pri restartu httpd

Jan ' Kozo ' Vajda jvajda na somi.sk
Úterý Říjen 23 16:02:54 CEST 2001


:> Existuje pro apache reseni ktere umozni pridavat subdomeny (domeny 3. radu)
:> bez restartu apache, tedy dynamicky? jak by jste to resily? pomoci
:> mod_rewrite?

mod_vhosts_alias

alebo

URL Rewriting Guide: http://httpd.apache.org/docs/misc/rewriteguide.html

konkretne cast: Virtual User Hosts


Description: 
  Assume that you want to provide www.username.host.domain.com for the
  homepage of username via just DNS A records to the same machine and
  without any virtualhosts on this machine.
Solution: 
  For HTTP/1.0 requests there is no solution, but for HTTP/1.1 requests
  which contain a Host: HTTP header we can use the following ruleset to
  rewrite http://www.username.host.com/anypath internally to
  /home/username/anypath:

  RewriteEngine on
  RewriteCond   %{HTTP_HOST}                 ^www\.[^.]+\.host\.com$
  RewriteRule   ^(.+)                        %{HTTP_HOST}$1	[C]
  RewriteRule   ^www\.([^.]+)\.host\.com(.*) /home/$1$2




		                                   K O Z O 
                		    ===================================
                                      Look At Your Young Man Fighting
                                         Look At Your Woman Crying
                                       Look At Your Young Man Dying
                                    The Way They've Always Done Before



Další informace o konferenci Linux