View unanswered posts | View active topics It is currently November 19th, 2017, 10:52 pm



Reply to topic  [ 13 posts ]  Go to page 1, 2  Next
 404 or rewrite 
Author Message

Joined: August 30th, 2008, 12:04 am
Posts: 15
Post 404 or rewrite
Can you add handler for 404? ATM I can't do anything. I would rather use rewrite, but 404 will be enought.

Still waiting for next release :)


September 3rd, 2008, 3:54 am
Profile
Site Admin

Joined: July 4th, 2008, 2:56 pm
Posts: 226
Post Re: 404 or rewrite
Sure. I'll implement 404.


September 3rd, 2008, 7:38 pm
Profile
Site Admin

Joined: July 4th, 2008, 2:56 pm
Posts: 226
Post Re: 404 or rewrite
Just FYI, version 1.2 will be released soon. Putting it through final testing.


September 4th, 2008, 11:29 pm
Profile

Joined: August 30th, 2008, 12:04 am
Posts: 15
Post Re: 404 or rewrite
If you need mirror just mail me (server in Poland).


September 5th, 2008, 7:11 am
Profile
Site Admin

Joined: July 4th, 2008, 2:56 pm
Posts: 226
Post Re: 404 or rewrite
By handling 404, or "rewrite", do you mean getting the server to respond with a 404 with the doc is not found, or a custom handler (html template) for 404?

By "rewrite", do you mean redirect?

v1.2.0 will respond with 404 when the page is not found for php pages so that it's consistent with html pages. Before, it would return a soft404 (i.e. 200 OK with error message). It will NOT support redirection in place of 404, or a custom 404 response.

I may, or may not add those features in future releases. I'll only add them in if I could find a way to still keep QuickPHP lightweight. The last thing I want to do is reimplementing IIS / Apache and that's not the intent of QuickPHP.


September 5th, 2008, 2:07 pm
Profile

Joined: August 30th, 2008, 12:04 am
Posts: 15
Post Re: 404 or rewrite
Some of php applications uses "nice url" - ie: /show_product_superextraproduct.html (redirected to /show.php?name=superextraproduct). I can't use my apllication if I need to rewrite all url's. If all 404 will be redirected to 'index.php' i will parse url and redirect to good script. I don't want to reimplement apache, but I want to publish my application for standalone application (with your sever - apache is too complicated for "normal user").


September 5th, 2008, 4:52 pm
Profile
Site Admin

Joined: July 4th, 2008, 2:56 pm
Posts: 226
Post Re: 404 or rewrite
Ah, you mean URL rewrite.

That's a VERY specific functionality that is implemented in Apache via module and IIS via ISAPI (plugin).
What I can do is, I'll implement a plugin architecture of some sort in QuickPHP, exposing some its client request info such as URL path. Within the plugin, you can change the path to anything you wish - you could even implement the same functionality you get with mod_rewrite. Again, this will make QuickPHP almost like a clone of Apache. If you need all these features, it'll be worth your time setting up Apache.

I suppose I could expose the client request info entirely to the plugin, and you or anyone could write the plugin in PHP to manipulate the info before passing it back to QuickPHP. In which case, a QuickPHP.ini file would probably be required to get it to use the plugins and to specify in which order each plugin is executed.

How does that sound?


September 5th, 2008, 6:21 pm
Profile

Joined: August 30th, 2008, 12:04 am
Posts: 15
Post Re: 404 or rewrite
I don't want server to get bigger and bigger. I don't want apache clone too.
Like I wrote some time ago - I need the simplest sever - exe, and nothing more (cfg or cli params).

URL rewriting is "optional" - 404.php in documenroot is enought. The only reason I want to rewrite is
"simplicyty" - and clear. I'd like /Products/action/show/id/12/full/1/ i don't like /index.php?module=products&action=show&id=12&full=1
They are "identical", but don't you like first url? All my aplication uses simpleurls.


September 5th, 2008, 6:31 pm
Profile
Site Admin

Joined: July 4th, 2008, 2:56 pm
Posts: 226
Post Re: 404 or rewrite
Agreed. Let me know what you think of this idea.
This is definitely simple (using PHP script to map your HTML url to the corresponding PHP), keeps memory usage low, and still easy to deploy.

Sounds good?


September 5th, 2008, 7:01 pm
Profile

Joined: August 30th, 2008, 12:04 am
Posts: 15
Post Re: 404 or rewrite
I agree with "functionality over speed" - It's server for testing and debugging - not productional.

About mod_rewrite vs script - mod_rewrite can handle "new" or "changed" url (ie: I've goot website with "old" urls - /asdf.php?asdf=1&qwer=2 - without any one line of php code I can add mod_rewrite to handle /asdf/asdf/1/qwer/2/ or even /asdf_asdf_1_qwer_2.html or both). But who cares?

We need simple server, not "the biggest and better".


September 5th, 2008, 7:16 pm
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 13 posts ]  Go to page 1, 2  Next

Who is online

Users browsing this forum: No registered users and 1 guest


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

Search for:
Jump to:  
cron
Powered by phpBB.