[PHP] Apache Rewrite Issues

2009-10-07 Thread Russell Seymour

Morning,

I am trying to make my URLs more search engine friendly and I have come 
up against a problem.


I want the following URL:

mysite.example.com/articles/Test Story

to be proxied to

mysite.example.com/index.php?m=articlest=Test%20Story

I have the following rule in my Apache conf

RewriteRule ^/articles/(.*) index.php?m=articlest=$1 [P,L]

Now if I run with this configuration, PHP strips the query string back 
at the space, so my query string ends up looking like


[QUERY_STRING] =  m=articlest=Test

even though the log file for the rewrite shows that the full query is being 
passed.

But if I change the RewriteRule to be a Rewrite instead of a Proxy I get

[QUERY_STRING] =  m=articlest=Test%20Story

So something is happening when the system is proxying the request.
Adding %20 into the URL does not fix the problem when proxy is enabled either.

I have search around on the Internet, and people talk about using urlencode 
etc, this is fine when
PHP is creating the URL but not when Apache is doing the rewrite.

I apologise if people feel this is on the wrong list, but as far as I can tell 
from the rewrite logs the data is coming all
the way through to PHP which is truncating it.  This is purely my observation.

Apache version: 2.2.11
PHP Version:5.3.0

Any help is gratefully recieved.

Thanks, Russell




[PHP] Document generation from XML

2004-02-03 Thread Russell Seymour
Good evening list,

I apologise profusely if after reading anyone thinks that is OT, but I
relally need some pointers with a project I am working on.  I have searched
the Internet for information on XML document generation but there is too
much information that I cannot decide which way to go.  Thanks lots in
advance.

I am currently writing a web based application using PHP that created
reports on the fly from a multitude of data sources.

In the beginning only one output format was required, HTML and then PDF was
a requirement.  More and more formats are now required by my users and
rather than create a new output script for each different format I am
thinking about outputting the final report as XML and then putting that
through 'something' to render in the format that I require.

However I am unclear as to the best way to do this as there seems to be many
different ways.  I have looked at using Apache FOP and DocBook, but they all
spawn off in different directions and bringing in other things such as Jade.

This post maybe slightly OT, but if nayone has any pointers on how I amy go
about doing this I would be very very grateful.

Thanks very much.

Russell

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



Re: [PHP] Document generation from XML

2004-02-03 Thread Russell Seymour
Ray,

I can create the XML of the document that I want to generate using the built
in XML functions in PHP.

THe thing I then want to do is be able to do is then use that XML to create
documents in multiple formats, e.g. PDF.

I think that I can use DocBook or Apache FO to do this, but I am not sure
which one to use or how to go about doing it.

Basically I want to be abel to speciy an output format and run the XML
through a transformation to get that format.

Does that make any more sense?

Russell
- Original Message - 
From: Ray Hunter [EMAIL PROTECTED]
Newsgroups: php.general
To: [EMAIL PROTECTED]
Sent: Tuesday, February 03, 2004 8:56 PM
Subject: Re: [PHP] Document generation from XML


 On Tue, 2004-02-03 at 13:50, Russell Seymour wrote:
  In the beginning only one output format was required, HTML and then PDF
was
  a requirement.  More and more formats are now required by my users and
  rather than create a new output script for each different format I am
  thinking about outputting the final report as XML and then putting that
  through 'something' to render in the format that I require.
 
  However I am unclear as to the best way to do this as there seems to be
many
  different ways.  I have looked at using Apache FOP and DocBook, but they
all
  spawn off in different directions and bringing in other things such as
Jade.

 You can create xml with various extensions in php. You can use sax or
 dom to do that or create your own strings that contain xml syntax. I
 have done both.  What are you really trying to do? Create an xml file
 from various data sources? Or create an xml file from another xml file?

 --
 Ray

Ray Hunter [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
 On Tue, 2004-02-03 at 13:50, Russell Seymour wrote:
  In the beginning only one output format was required, HTML and then PDF
was
  a requirement.  More and more formats are now required by my users and
  rather than create a new output script for each different format I am
  thinking about outputting the final report as XML and then putting that
  through 'something' to render in the format that I require.
 
  However I am unclear as to the best way to do this as there seems to be
many
  different ways.  I have looked at using Apache FOP and DocBook, but they
all
  spawn off in different directions and bringing in other things such as
Jade.

 You can create xml with various extensions in php. You can use sax or
 dom to do that or create your own strings that contain xml syntax. I
 have done both.  What are you really trying to do? Create an xml file
 from various data sources? Or create an xml file from another xml file?

 --
 Ray

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