现在我想要以下功能。
domain.com/blablarandomnames/.... - must show domain.com/index.php
和
domain.com/claim/anyrandomnames/... - must show domain.com/claim/url.php
我尝试了下面的代码,但只有domain.com/blablarandomnames/
正在运行,而不是另一个。
RewriteEngine On
RewriteBase /
RewriteRule ^claim(\/?)$ claim/url.php [QSA,NC,L]
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-l
RewriteRule (.*)(\/?)$ / [QSA,NC,L]
答案 0 :(得分:0)
尝试:
RewriteEngine On
RewriteBase /
RewriteRule ^claim.*$ claim/url.php [QSA,NC,L]
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-l
RewriteRule ^(.*)$ / [NC,L]