【发布时间】:2015-07-03 22:21:21
【问题描述】:
我想使用直接从 web url 访问来访问 yii 中的核心 php 文件
我的 htaccess 是
<IfModule mod_rewrite.c>
RewriteEngine On
# Some hosts may require you to use the `RewriteBase` directive.
# If you need to use the `RewriteBase` directive, it should be the
# absolute physical path to the directory that contains this htaccess file.
#
# RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [QSA,L]
</IfModule>
谢谢
【问题讨论】:
-
直接把你的文件放到你的index.php所在的根目录
-
但它无法正常工作,我面临找不到网址
-
我刚刚测试过,它正在工作。创建新文件 test.php 放置 index.php 文件并访问 url,如 yourdomain.com/test.php
-
感谢您的工作时间