Re: [PHP] $PHP_SELF with redirected domain

2003-03-03 Thread bill
Thanks Chris for your thoughts, but no success yet.

Details interspersed below

Chris Hayes wrote:

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

No, the problem is that the URLs don't match.  The browser does accurately find
the page, etc., but the url is wrong.  It makes it hard to evaluate site
statistics, etc.

 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('/') )

It would be easier to hard code the name of the page in the POST.  With this
suggestion, what if I move the page to a deeper subdir?  I want PHP_SELF to be
the same url as the page.

 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?

Tried that and redirecting failed.

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

Can't do that, the page is repeatedly and indefinitely called.

Others have asked me to tell them if we find a solution.  Which we're still
looking for, I guess.  I'm still open to suggestions.

kind regards,

bill

 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



[PHP] $PHP_SELF with redirected domain

2003-02-26 Thread bill
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



Re: [PHP] $PHP_SELF with redirected domain

2003-02-26 Thread Chris Hayes
...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