我想做的是在只有两个值的情况下从路径获取值。实施例
127.0.0.1/myApp/<anyName>
,应翻译为127.0.0.1/myApp/SubApp/Controller/Test/Index.php?name=<anyName>
我做了这个
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /myApp/SubApp/Controller/Test/Index.php?name=$1 [L]
但现在我的第二条规则中存在冲突,即翻译
127.0.0.1/myApp/Test/TestPage/1/text
到127.0.0.1/myApp/SubApp/Controller/Test/TestPage.php?id=1&string=text&...
RewriteCond %{REQUEST_URI} !^/myApp/SubApp/Controller/[^/]+/[^/]+\.php
RewriteRule ^([^/]+)/([^/]+)/?(.*)$ /myApp/SubApp/Controller/$1/$2.php/$3 [L]
如何解决此问题