2013-02-26 35 views
1

你能帮我.htaccess吗?我有简单的代码用于测试的子文件夹

Options -Indexes 

RewriteEngine On 
#RewriteBase/

# front controller 
RewriteCond %{REQUEST_FILENAME} !-f 
RewriteCond %{REQUEST_FILENAME} !-d 
RewriteRule !\.(pdf|js|ico|gif|jpg|png|css|rar|zip|tar\.gz)$ index.php [L] 

AddType application/x-httpd-php .php .phtml 

这段代码是确定的,如果我用这一个在根文件夹(本地主机),但我需要在子文件夹,这里是index.php文件过于服务器上测试该代码。

我使用URL作为http://domain.com/parameter/parameter,但我现在需要使用http://domain.com/folder_test/parameter/parameter

谢谢您的回答。

+0

什么问题,有错误,没有重定向?请用'参数'的例子来解释。 .htaccess文件的位置,在根目录或'folder_test'目录中? – 2013-02-26 11:16:22

回答

0

取消注释#RewriteBase /,使之RewriteBase /your_folder/并尝试

+0

尝试一下,仍然是同样的问题。如果我尝试URL http://domain.com/folder_test/parameter/我重定向到http://domain.com/parameter/ – user2110796 2013-02-26 10:49:17

相关问题