【问题标题】:Subfolder for testing用于测试的子文件夹
【发布时间】:2013-02-26 10:32:39
【问题描述】:

你能帮我处理.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

感谢您的回答。

【问题讨论】:

  • 什么问题,有错误,没有重定向?请举例说明parameter。 .htaccess 文件在哪里,在根目录还是在folder_test 目录中?

标签: php .htaccess directory


【解决方案1】:

取消注释 #RewriteBase / 并将其设为 RewriteBase /your_folder/ 并尝试

【讨论】:

猜你喜欢
  • 1970-01-01
  • 2015-10-25
  • 1970-01-01
  • 1970-01-01
  • 2011-03-28
  • 1970-01-01
  • 2011-05-17
  • 1970-01-01
  • 2017-03-29
相关资源
最近更新 更多