【发布时间】:2011-05-09 17:02:43
【问题描述】:
大家好,我设置了以下 htaccess 文件以允许重写 url:
RewriteEngine on
RewriteCond %{HTTP_HOST} ^mysite.com [NC]
#RewriteRule (.*) http://www.mysite.com/$1 [L,R=301]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule .* index.php
RewriteRule !\.(js|ico|gif|jpg|png|swf|css|htm|html|php5)$ index.php
php_flag magic_quotes_gpc Off
RewriteCond %{REQUEST_FILENAME} -d
AddType text/css .css
AddHandler php5-script .php
我想创建一个 iframe,它指向 public_html 文件夹上的文件夹中的一个文件,但是根据上面设置的 htaccess,我需要为这个文件夹及其内容设置一个例外 - 我该怎么做?
编辑====================
我的文件夹结构设置如下,这是基于 zend 框架的应用程序的标准:
application
html
->importer
library
我希望对 www.mysite.com/importer 的任何引用都将其视为正常引用,而不是将 importer 作为要传递给 index.php 文件的参数。
【问题讨论】:
-
如果您只希望它在访问特定文件夹中的文件时进行处理,只需将
.htaccess文件放在该文件夹中即可。
标签: php zend-framework .htaccess url-rewriting