Justtechjobs.com Find a programming school near you






Online Campus Both


php-general | 2003022

Re: [PHP] $PHP_SELF with redirected domain From: Chris Hayes (chayes <email protected>)
Date: 02/26/03

...and the problem that the form immediately goes to the real url is that
people see the real url?

What about one of the following:

  - chop off the subdir again by only putting the last part of $PHP_SELF as
form action (f.i. with a combination of substr($PHP_SELF,...,...) and
strpos('/') )

or
  - when i do a full path in the redirect in .htaccess:
         ErrorDocument 404 http://www.domain.org/redirect/redirect.php
         it is treated as a fresh page and all form results are lost

         but when i do
         ErrorDocument 404 /redirect/redirect.php
         in .htaccess, the original post and get vars stay, and i suppose
also the original $PHP_SELF

Maybe the same happens with your thing, i happen not to know what %1/$1
does. If %1 is the domain, try to do it without that (but with the slash,
so /$1 ). Worth a try innit?

or
- simply make a new page that receives the file, or not using $PHP_SELF but
the actual filename.

At 18:42 26-2-03, you wrote:
>If I use $PHP_SELF as the action in a form where the domain name is
>redirected,
>I get the extra directory.
>
>Is there a way around that?
>
>Details:
>
>The domain name is redirected in .htaccess like this:
>
>RewriteCond %{REQUEST_URI} !domain2
>RewriteRule ^(.*) %1/$1 [L]
>
>So, domain2 is really a directory on domain1, but http://domain2.com will be
>taken to that directory on domain 1 as if it was the http root
>
>But, when using $PHP_SELF, I get the extra directory, so the form may start
>here:
>
>http://domain2.com/myform.php
>
>But the $PHP_SELF forces the next POST page to be
>
>http://domain2.com/domain2/myform.php
>
>Ideas?
>
>kind regards,
>
>bill hollett
>
>
>--
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, visit: http://www.php.net/unsub.php

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php