0

所以我想将三个变量(用斜杠分隔)发送到我的 index.php 但我无法让它工作,我是 htaccess 的韭菜。

我的基本网址是 localhost:8888/smbo/

我有这段代码不起作用:

<IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /smbo/

    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^([A-Za-z0-9_-]+)/([A-Za-z0-9_-]+)/([A-Za-z0-9_-]+)$ index.php?id=$1&idTwo=$2&idThree=$3
</IfModule>

谁能帮我?

4

1 回答 1

0

试试这个代码:

RewriteEngine On
RewriteBase /smbo/

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^([^/]+)/([^/]+)/([^/]+)$ /index.php?id=$1&idTwo=$2&idThree=$3
于 2013-07-22T09:00:24.623 回答