Re: Header Redirect Bug
Chung Leong wrote:
[color=blue]
> Is the script dying after the first call to header()? Run this and
> see which files get created:
>
> header("HTTP/1.1 301 Moved permanently");
> touch("after_fi rst_header");
> header("Locatio n: http://www.example.com ");
> touch("after_se cond_header");
>
> // perhaps track_errors is on?
> fwrite(fopen("p hp_errormsg", "w"), $php_errormsg);
>
> Also try changing the header to "HTTP/1.0".
>[/color]
Thanks for trying to help. The script idea doesn't work on my
misconfigured served which I don't have complete control over. The
"php_errorm sg" was created, but empty. I'm now trying to figure out how
to solve this problem right within the htaccess file, and this is my
current try:
RewriteEngine on
Options +FollowSymlinks
RewriteBase /
RewriteRule ^(.*)-([0-9]*).html show.php?title= $1&part=$2
And then someone suggested this but it doesn't quite work for me...
RewriteCond %{QUERY_STRING} ^title=([a-z]+)&part=([0-9]+)
RewriteRule ^book.php$ %1-%2? [redirect=perman ent]
Chung Leong wrote:
[color=blue]
> Is the script dying after the first call to header()? Run this and
> see which files get created:
>
> header("HTTP/1.1 301 Moved permanently");
> touch("after_fi rst_header");
> header("Locatio n: http://www.example.com ");
> touch("after_se cond_header");
>
> // perhaps track_errors is on?
> fwrite(fopen("p hp_errormsg", "w"), $php_errormsg);
>
> Also try changing the header to "HTTP/1.0".
>[/color]
Thanks for trying to help. The script idea doesn't work on my
misconfigured served which I don't have complete control over. The
"php_errorm sg" was created, but empty. I'm now trying to figure out how
to solve this problem right within the htaccess file, and this is my
current try:
RewriteEngine on
Options +FollowSymlinks
RewriteBase /
RewriteRule ^(.*)-([0-9]*).html show.php?title= $1&part=$2
And then someone suggested this but it doesn't quite work for me...
RewriteCond %{QUERY_STRING} ^title=([a-z]+)&part=([0-9]+)
RewriteRule ^book.php$ %1-%2? [redirect=perman ent]
Comment