我正在尝试重写我的网址,但仍然没有成功。我用谷歌搜索了两天,但没有成功。我正在粘贴我的 .htaccess 代码
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{HTTP_HOST} localhost [NC]
RewriteCond %{REQUEST_URI} !^/folder1/
RewriteRule ^(.*)$ /folder1/$1 [L]
这是我的目录:
localhost/project/index.php
在这个页面有两个按钮。如果单击按钮一个,它应该重定向到 folder1/index.php 否则如果单击两个按钮,那么它应该重定向 folder2/index.php
localhost/project/folder1/index.php
localhost/project/folder2/index.php
Basically I don't want display folder1 or folder2 directory names.
any idea please thanks
我要显示的实际网址应如下所示:
localhost/project/