__/ [davidof] on Friday 28 October 2005 13:23 \__
> Roy Schestowitz wrote:
>> __/ [John Bokma] on Monday 24 October 2005 14:37 \__
>>
>>>>This was discussed before. See entire thread by following the address
>>>>below:
>>>
>>>
>>>
>>>>RewriteEngine On
>>>>RewriteCond %{HTTP_HOST} !^www\.speaktomecatalog.com
>>>>RewriteRule (.*) http://www.speaktomecatalog.com [R=301,L]
>>>
>>
>>
>> I did. It broke my Wikis
>
> I had trouble with this under similar circumstances so I just stuck the
> rewrite code into the top of my wiki/blog/whatever:
>
> $request = $_SERVER['REQUEST_URI'];
> $server = $_SERVER['HTTP_HOST'];
>
> $prefix = strtolower(substr($server,0,4));
> if ($prefix != "www.") {
> # combine page rank
> header("HTTP/1.1 301 Moved Permanently");
> header("Location: http://www.$server$request");
> exit;
> }
>
> in this case I'm rewriting not www. to www, you probably want to reverse
> this as John says www. serves no real purpose. This needs to be at the
> top of any PHP script. YMMV.
The pieces begin to fall onto the right spaces in the puzzle. The
password-protected pages which broke were PHP indices and I use 3
installations of PhpWiki.
I estimate that modification of all so-called 'user-facing' PHP scripts would
mean endless testing, which involves risk. I can think of a few dozens of
places where your code ought to be inserted.
Thanks, David.
|
|