2010-10-13 77 views
0

假设我的根目录中有两个php文件(可以从因特网连接):index.php和some.php。当有人去我的网站mydomain.net我希望他们实际上访问some.php和任何进一步的路径中提出的URL将被发送到some.php作为GET值。我将如何使用.htaccess来做到这一点?用.htaccess重写规则

mydomain.net - > some.php

mydomain.net/index.php? - > some.php值= index.php的

mydomain.net/somefolder/index.php - >一些.php?value = somefolder/index.php

回答

1
Options +FollowSymlinks 
RewriteEngine on 
RewriteRule ^(.*)$ some.php?value=$1