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
精彩评论