.htaccess 到 .hiawatha 正则表达式转换
.htaccess to .hiawatha regex conversion
所以我不明白从 htaccess 到 hiawatha 的转换是如何工作的。你能推荐一个好的网站或一本好书来进入这个话题吗?
我的问题是以下转换:
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^((?s).*)$ index.php?_url=/ [QSA,L]
htaccess
RequestURI exists Return
Match ^((?s).*)$ Rewrite /index.php?_url=/
海华沙
但是 Match Rewrite 语句是错误的...
hiawatha URL TOOLKIT 的解决方案是:
RequestURI exists Return
Match ^/(.*) Rewrite /index.php?_url=/
这会将所有内容重定向到 index.php。
例如
http://host/get/123
重写为
http://host/index.php?_url=/get/123
所以我不明白从 htaccess 到 hiawatha 的转换是如何工作的。你能推荐一个好的网站或一本好书来进入这个话题吗?
我的问题是以下转换:
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^((?s).*)$ index.php?_url=/ [QSA,L]
htaccess
RequestURI exists Return
Match ^((?s).*)$ Rewrite /index.php?_url=/
海华沙
但是 Match Rewrite 语句是错误的...
hiawatha URL TOOLKIT 的解决方案是:
RequestURI exists Return
Match ^/(.*) Rewrite /index.php?_url=/
这会将所有内容重定向到 index.php。
例如
http://host/get/123
重写为
http://host/index.php?_url=/get/123