Erlang/OTP Forums

Author Message

<  Yaws mailing list  ~  rewrite for php

Guest
Posted: Mon Feb 01, 2010 1:54 pm Reply with quote
Guest
for an php application i need to rewrite all requests (for where is no file) to index.php


for a 404 handler i dont know, how i could execute the index.php

for a rewrite i have the Problem, that there is the index.php in the REQUEST_URI Variable.

for example, at the moment it will be rewritten to
/index.php/example/bugs/chart/types

but the REQUEST_URI should look like
/example/bugs/chart/types

but i dont get it, that the index.php will executet with it.

My code for the rewrite til now

arg_rewrite(ARG) ->
hiveminds
Posted: Tue Feb 02, 2010 7:33 am Reply with quote
User Joined: 15 Apr 2009 Posts: 12 Location: Sweden
I looked at this source code and found that it takes care of the
problem you are having. If not then it may be easier to modify.

http://forum.trapexit.org/viewtopic.php?t=14964


On Mon, Feb 1, 2010 at 2:53 PM, Daniel Fahlke <flyingmana@googlemail.com> wrote:
> for an php application i need to rewrite all requests (for where is no file)
> to index.php
>
>
> for a 404 handler i dont know, how i could execute the index.php
>
> for a rewrite i have the Problem, that there is the index.php in the
> REQUEST_URI Variable.
>
> for example, at the moment it will be rewritten to
> /index.php/example/bugs/chart/types
>
> but the REQUEST_URI should look like
> /example/bugs/chart/types
>
> but i dont get it, that the index.php will executet with it.
>
> My code for the rewrite til now
>
> arg_rewrite(ARG) ->
>
View user's profile Send private message Visit poster's website
Guest
Posted: Tue Feb 02, 2010 10:25 am Reply with quote
Guest
yeah, forgotten that i testet at least, to strip the index.php complete and see, if yaws handle it like a normal call to document root (like example.com that calls the same like example.com/index.php)
but an url like example.com//this/is/an/path dont call the index.php


I have now handle it with an 404-error module, what executes the index.php as a cgi.

out404(Arg) ->

Display posts from previous:  

All times are GMT
Page 1 of 1
This forum is locked: you cannot post, reply to, or edit topics.

Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum