我想重写http://example.com/apps/app4/step1.php
为http://easyfanpageapp.com/apps/
我已经使用过这个重写但它不起作用。
RewriteEngine On
RewriteBase /
RewriteRule ^apps/?$ ^(.*)\step1.php$ [NC,L]
也尝试过
RewriteRule ^apps/?$ apps/app4/step1.php$ [NC,L]
可能出了什么问题?
答案1
执行您要求的规则是:
RewriteRule ^apps apps/app4/step1.php [NC,L]
根据您的应用,您可能需要更多:
RewriteRule ^apps(.*) apps/app4/step1.php?args=$1 [NC,L]