[Typo3] realurl - rewriting - apache admins

Wolfgang Klinger wolfgang at stufenlos.net
Wed Feb 2 16:17:18 CET 2005


Hi all,

It's again a problem (IMHO) with the SCRIPT_NAME (as we had it one year or so ago)....

php_sapi_name() returns "apache"
rewrite with .htaccess, content of $_SERVER
---------
Array
(
    [DOCUMENT_ROOT] => /var/www/subdomain
    [HTTP_ACCEPT] => text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
    [HTTP_ACCEPT_CHARSET] => ISO-8859-1,utf-8;q=0.7,*;q=0.7
    [HTTP_ACCEPT_ENCODING] => gzip,deflate
    [HTTP_ACCEPT_LANGUAGE] => en-us,en;q=0.5
    [HTTP_CACHE_CONTROL] => no-cache
    [HTTP_CONNECTION] => keep-alive
    [HTTP_COOKIE] => fe_typo_user=8f47e8caca; be_typo_user=9f98675f732a6f977bfd37a0833b5297
    [HTTP_HOST] => subdomain.server
    [HTTP_KEEP_ALIVE] => 300
    [HTTP_PRAGMA] => no-cache
    [HTTP_REFERER] => http://subdomain.server/who-is-who/
    [HTTP_USER_AGENT] => Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.5) Gecko/20041107 Firefox/1.0
    [PATH] => /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/bin/X11
    [REDIRECT_STATUS] => 200
    [REDIRECT_UNIQUE_ID] => QgD6t8CoAAIAABwdBSI
    [REDIRECT_URL] => /who-is-who/
    [REMOTE_ADDR] => 192.168.0.4
    [REMOTE_PORT] => 4512
    [SCRIPT_FILENAME] => /var/www/subdomain/index.php
    [SERVER_ADDR] => 192.168.0.2
    [SERVER_ADMIN] => root at server.stufenlos.net
    [SERVER_NAME] => subdomain.server
    [SERVER_PORT] => 80
    [SERVER_SIGNATURE] => <ADDRESS>Apache/1.3.33 Server at subdomain.server Port 80</ADDRESS>

    [SERVER_SOFTWARE] => Apache/1.3.33 (Debian GNU/Linux) PHP/4.3.10
    [UNIQUE_ID] => QgD6t8CoAAIAABwdBSI
    [GATEWAY_INTERFACE] => CGI/1.1
    [SERVER_PROTOCOL] => HTTP/1.1
    [REQUEST_METHOD] => GET
    [QUERY_STRING] => 
    [REQUEST_URI] => /who-is-who/
    [SCRIPT_NAME] => /index.php
    [PATH_TRANSLATED] => /var/www/subdomain/index.php
    [PHP_SELF] => /index.php
    [argv] => Array
        (
        )

    [argc] => 0
)
---------
t3lib_div::getIndpEnv('SCRIPT_NAME') returns: /index.php
(works)

and here's the same with httpd.conf
---------
Array
(
    [DOCUMENT_ROOT] => /var/www/subdomain
    [HTTP_ACCEPT] => text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
    [HTTP_ACCEPT_CHARSET] => ISO-8859-1,utf-8;q=0.7,*;q=0.7
    [HTTP_ACCEPT_ENCODING] => gzip,deflate
    [HTTP_ACCEPT_LANGUAGE] => en-us,en;q=0.5
    [HTTP_CACHE_CONTROL] => max-age=0
    [HTTP_CONNECTION] => keep-alive
    [HTTP_COOKIE] => fe_typo_user=8f47e8caca; be_typo_user=9f98675f732a6f977bfd37a0833b5297
    [HTTP_HOST] => subdomain.server
    [HTTP_IF_MODIFIED_SINCE] => Wed, 02 Feb 2005 16:06:06 GMT
    [HTTP_KEEP_ALIVE] => 300
    [HTTP_REFERER] => http://subdomain.server/who-is-who/
    [HTTP_USER_AGENT] => Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.5) Gecko/20041107 Firefox/1.0
    [PATH] => /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/bin/X11
    [REMOTE_ADDR] => 192.168.0.4
    [REMOTE_PORT] => 4511
    [SCRIPT_FILENAME] => /var/www/subdomain/index.php
    [SCRIPT_URI] => http://subdomain.server/who-is-who/
    [SCRIPT_URL] => /who-is-who/
    [SERVER_ADDR] => 192.168.0.2
    [SERVER_ADMIN] => root at server.stufenlos.net
    [SERVER_NAME] => subdomain.server
    [SERVER_PORT] => 80
    [SERVER_SIGNATURE] => <ADDRESS>Apache/1.3.33 Server at subdomain.server Port 80</ADDRESS>

    [SERVER_SOFTWARE] => Apache/1.3.33 (Debian GNU/Linux) PHP/4.3.10
    [UNIQUE_ID] => QgD6ksCoAAIAABnRBZg
    [GATEWAY_INTERFACE] => CGI/1.1
    [SERVER_PROTOCOL] => HTTP/1.1
    [REQUEST_METHOD] => GET
    [QUERY_STRING] => 
    [REQUEST_URI] => /who-is-who/
    [SCRIPT_NAME] => /who-is-who/
    [PATH_TRANSLATED] => /var/www/subdomain/index.php
    [PHP_SELF] => /who-is-who/
    [argv] => Array
        (
        )

    [argc] => 0
)
---------
t3lib_div::getIndpEnv('SCRIPT_NAME') returns: /who-is-who/
(doesn't work)

What do you think?


bye
Wolfgang

-----------------------
This thread is located in the archive at this URL:
http://typo3.org/documentation/mailing-lists/english-main-list-archive/thread/110108888/
					



More information about the TYPO3-english mailing list