问题描述:

I am stuck here i have tried googling but couldn't find solution

Options +FollowSymLinks

RewriteEngine On

RewriteRule ^index\.php|style.css|img\.png$ - [L]

# RewriteRule .* index.php [L]

RewriteRule ^(.*)$ index.php?params=$1 [NC]

When i hit url http://localhost/moviestock/home/index print_r($_GET) then i got this output Array ( ) that means $_GET == array() but i want $_GET like this $_GET == array('controler'=> 'home', 'action' => 'index' ) it is similar to http://localhost/moviestock/index.php?controler=home&action=index please give me any solution

网友答案:

Try theses lines in your htaccess :

RewriteEngine on
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !\.(css|js|png)$
RewriteRule moviestock/([^/])+/([^/])+/?$ moviestock/index.php?controler=$1&action=$2
相关阅读:
Top