0

Im in /order/test

When I try to /order/test?lala=test&baba=test

public function action_test(){
echo var_dump($_GET);
}

It should output lala=test&baba=test in the var_dump(), but instead it gives me:

array(1) { ["order/test"]=> string(0) "" }

Why has this happend? How can i fix this?

This is my htaccess:

# Turn on URL rewriting
RewriteEngine On

# Installation directory
RewriteBase /

# Protect hidden files from being viewed
<Files .*>
    Order Deny,Allow
    Deny From All
</Files>

# Protect application and system files from being viewed
RewriteRule ^(?:application|modules|system)\b.* index.php/$0 [F,L]

# Allow any files or directories that exist to be displayed directly
RewriteCond ${REQUEST_URI} ^.+$
RewriteCond %{REQUEST_FILENAME} \.(gif|jpe?g|png|pdf)$ [OR]
RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d [OR]
RewriteCond %{REQUEST_FILENAME} -l
RewriteRule ^ - [L]

# Rewrite all other URLs to index.php/URL
RewriteRule .* index.php?$0 [PT,L]
Karem
  • 17,615
  • 72
  • 178
  • 278

2 Answers2

1

This is what I have in original .htaccess:

# Rewrite all other URLs to index.php/URL
RewriteRule .* index.php/$0 [PT]

Also don't use $_GET, but

$this->request->query()

instead for HMVC applications.

matino
  • 17,199
  • 8
  • 49
  • 58
0

Change your rewrite rule to

RewriteRule .* index.php?$0 [PT,L,QSA]
zerkms
  • 249,484
  • 69
  • 436
  • 539