Forum

urltollkit for cakePHP

Edu
1 May 2015, 20:04
Hiawatha version: 9,12
Operating System: Fedora 21

Hi

I'm facing some issues to read $_GET variable when trying to reach some subfolder

When I use: https://www.example.com/?code=123

It works and I get this result on on phpinfo()
PHP Variables
Variable Value
_REQUEST["code"] 123
_GET["code"] 123
_SERVER["REQUEST_URI"] /?code=123
_SERVER["SCRIPT_NAME"] /index.php


But when I try: https://www.example.com/users/confirm?code=123

The variables are empty

_SERVER["REQUEST_URI"] /users/confirm/?code=123
_SERVER["SCRIPT_NAME"] /index.php

Edu
1 May 2015, 20:09
This is my exiting toolkit
UrlToolkit {
ToolkitID = cakephp
RequestURI exists Return
Match .* Rewrite /index.php
}

I tried many configurations, but nothing that works so far.

I would be glad if someone could help me writing the the right line.

Edu
Edu
3 May 2015, 18:29
So, at the end is always simple....

this is the solution for cakePHP receive GET request on Hiawatha
UrlToolkit {
ToolkitID = cakephp
RequestURI exists Return
Match .*\?(.*) Rewrite /index.php?$1
Match .* Rewrite /index.php
}
Hugo Leisink
3 May 2015, 19:25
Sorry for long delay. Yes, your rewrite rules looks correct.
This topic has been closed.