开发者

Rewriting rules with .htaccess

Let's say I have two php files in my root directory (acceable from the internet): index.php and some.php. When someone goes to my site at mydomain.net I want them to be actually accessing some.php and any further path p开发者_开发问答resented in the url would be sent to some.php as a GET value. How would I do this with .htaccess?

mydomain.net -> some.php

mydomain.net/index.php -> some.php?value=index.php

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


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

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜