Php 使用.htaccess重写规则
假设我的根目录中有两个php文件(可从internet访问):index.php和some.php。当有人访问我的网站mydomain.net时,我希望他们实际访问some.php,url中显示的任何进一步路径都将作为GET值发送到some.php。我将如何使用.htaccess执行此操作 mydomain.net->some.php mydomain.net/index.php->some.php?value=index.php mydomain.net/somefolder/index.php->some.php?value=somefolder/index.phpPhp 使用.htaccess重写规则,php,.htaccess,Php,.htaccess,假设我的根目录中有两个php文件(可从internet访问):index.php和some.php。当有人访问我的网站mydomain.net时,我希望他们实际访问some.php,url中显示的任何进一步路径都将作为GET值发送到some.php。我将如何使用.htaccess执行此操作 mydomain.net->some.php mydomain.net/index.php->some.php?value=index.php mydomain.net/somefolder/index.ph
Options +FollowSymlinks
RewriteEngine on
RewriteRule ^(.*)$ some.php?value=$1