【发布时间】:2013-01-25 16:02:21
【问题描述】:
我有一个发送这些 url 的 .htaccess:
http://example.com/this/is/test/
到 index.php 获取这样的 url:
index.php?var1=this&var2=is&var3=test
我要做的就是将/ 更改为:意味着网址将是这样的:
http://example.com/this:is:test
就像以前一样将变量发送到索引页面。这是我的 .htaccess 文件:
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} ^/([^/]+)?/?([^/]+)?/?([^/]+)?/? [NC]
RewriteRule .* index.php?var1=%1&var2=%2&var3=%3 [L]
【问题讨论】:
标签: .htaccess