Re: redirect on apache 2.0



On Tue, 28 Jun 2005 09:54:57 -0700, Akimeu wrote:

> Hello all... I have a site running http/https on it. I would like to
> redirect all http incoming requests to the https (SSL). Unfortunately, what
> I'm trying does not work.... I basically created an index.php in the
> DocumentRoot, modified http.conf file and restarted apache w/out any luck.
>
> The contents of the index.php file are as follows:
>
> <?
> header("location:https://sitename.com/index.html";);
> exit;
> ?>
>
> What I get back is a blank, white web page.
>
> Thanks for any assistance.
>
> Al

What are the contents of "index.html"?
I think (and I may be wrong) that headers are case-sensitive. Try
"Location: https://blah.blah.blah";

Also, to debug, try to see if the header() redirection is working at all.
Try:

<?
header("Location: http://www.ibm.com";);
exit;
?>

(or some other "real" website/URL)

Does that work?

Then, test to see if PHP is even working. Replace everything with:

<?phpinfo()?>

later...
--
JDS | jeffrey@xxxxxxxxxxxxxxx
| http://www.newtnotes.com
DJMBS | http://newtnotes.com/doctor-jeff-master-brainsurgeon/

.



Relevant Pages

  • cant redirect to Excel
    ... I want to do is redirect to Excel in the case of the External user. ... Internal user query SELECT_sightings_leasecars.to go to my ...
    (comp.lang.php)
  • Re: [PHP] http_request
    ... How do I return the cookies, headers etc. from the layer (which are ... How do I redirect browser from the layer.php to a page of the ...
    (php.general)
  • Re: headers sent issue
    ... Jerry Stuckle wrote: ... and it seems headers are sent, but maybe before I try to redirect. ... Use output buffering, should fix your problem. ...
    (comp.lang.php)
  • RE: Perl cgi redirect not working
    ... > 1) This is a little extreme for a simple redirect. ... > 3 liner will ... > do the trick: ...
    (freebsd-questions)
  • Re: Redirect a web site
    ... How can I redirect from one website to another, ... This is trivial if you have access to the server and very nearly so if you ... Scripts writing 301 redirect headers are a poor third option and refresh ... Issue all the users with email accounts on the established domain. ...
    (comp.sys.acorn.misc)

Loading