我想重写我的网址,但仍然没有得到成功。我两天后搜索了Google,但没有成功。我粘贴我的.htaccess代码URL重写隐藏文件夹名称从URL
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
在此页面
有两个按钮。如果一个按钮按下,它应该重定向到文件夹1/index.php文件否则,如果两个按钮按下那么它应该重定向文件夹2/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
实际工作中的网址,我想显示应该是这样的:
本地主机/项目/
你需要告诉我们你喜欢什么网址每个文件夹显示为。您需要以某种方式区分这两个文件夹。 – 2013-05-02 07:24:04
执行url我想要显示应该是这样的: localhost/project/ – Raheel 2013-05-02 07:33:31
好的,文件名? localhost/project/folder1和localhost/project/folder2还是什么?你不能让localhost/project参考两个不同的位置。 – 2013-05-02 07:38:58