Skip to content
This repository was archived by the owner on Jul 6, 2020. It is now read-only.
This repository was archived by the owner on Jul 6, 2020. It is now read-only.

.htaccess with get parameter #26

Description

@ceresyuyi

Question :

  1. First, set the "page" parameter

.htaccess

RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.+)$ index.php?page=$1 [QSA,L]

  1. Second,

use RestService\Server;

$page = $_GET['page'];

Server::create($page) // Not working...
->addGetRoute('test', function(){
return 'Yay!';
})
->addGetRoute('foo/(.*)', function($bar){
return $bar;
})
->run();

Suggestion?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions