1
我的URL看起來LIK:htaccess的重寫規則
http://example/en/account/register
我想用正則表達式來抓住這個網址
RewriteRule ^(\w{2}+)/(^account)$
在這個規則我想有包含http://example/en/account/
我無法找到我的正則表達式中的問題,因爲此正則表達式對於該url不正確...
我的URL看起來LIK:htaccess的重寫規則
http://example/en/account/register
我想用正則表達式來抓住這個網址
RewriteRule ^(\w{2}+)/(^account)$
在這個規則我想有包含http://example/en/account/
我無法找到我的正則表達式中的問題,因爲此正則表達式對於該url不正確...
您可以使用此模式:關於你的正則表達式
RewriteRule ^(\w{2})/(account)/?$ your-handler [L]
2點:
\w{2}
不\w{2}+
^
這意味着開始輸入。