【发布时间】:2017-10-14 12:00:18
【问题描述】:
我有一个包含不同 php 文件和 sql 数据库的网站。这是一个内容管理网站。我正在尝试在此路径上使用 XAMPP 服务器在 localhost 上对其进行测试: 本地主机/avs avs 是 index 和所有其他文件所在的文件夹。 当我启动该网站时,它会显示一个启动屏幕,但不会转到进一步的链接,因为链接兼作: 输入按钮:localhost/avs 更改 为 localhost/avs/localhost/avs
下面是 configs.paths.php 的代码,我在其中插入了 localhost 路径,[仅更改了 01 处 BASE_URL,其余均为默认]:
<?php
defined('_VALID') or die('Restricted Access!');
$config = array();
$config
['BASE_URL'] = 'localhost/avs';
$config['RELATIVE'] = '';
$config['BASE_DIR'] =
dirname(dirname(__FILE__));
$config['TMP_DIR'] = $config['BASE_DIR']. '/tmp';
$config['LOG_DIR'] = $config['BASE_DIR']. '/tmp/logs';
$config['IMG_DIR'] =
$config['BASE_DIR']. '/images';
$config['IMG_URL'] = $config['BASE_URL'].
'/images';
$config['PHO_DIR'] = $config['BASE_DIR']. '/media/users';
$config
['PHO_URL'] = $config['BASE_URL']. '/media/users';
$config['VDO_DIR'] = $config
['BASE_DIR']. '/media/videos/vid';
$config['VDO_URL'] = $config['BASE_URL'].
'/media/videos/vid';
$config['FLVDO_DIR'] = $config['BASE_DIR'].
'/media/videos/flv';
$config['FLVDO_URL'] = $config['BASE_URL'].
'/media/videos/flv';
$config['TMB_DIR'] = $config['BASE_DIR'].
'/media/videos/tmb';
$config['TMB_URL'] = $config['BASE_URL'].
'/media/videos/tmb';
$config['HD_DIR'] = $config['BASE_DIR'].'/media/videos/hd';
$config['HD_URL'] = $config['BASE_URL'].'/media/videos/hd';
$config
['IPHONE_DIR'] = $config['BASE_DIR'].'/media/videos/iphone';
$config
['IPHONE_URL'] = $config['BASE_URL'].'/media/videos/iphone';
?>
.htaccess:
# Comment the 2 lines below if the server returns 500 errors!
Options -Indexes
Options +FollowSymLinks
#Uncomment following lines if you want to use image caching!
#<IfModule mod_expires.c>
# ExpiresActive On
# ExpiresDefault A1209600
# ExpiresByType text/html A1
#</IfModule>
# Uncomment following lines if Apache doesnt support MultiViews!
<IfModule mod_rewrite.c>
RewriteEngine On
# Uncomment the 2 lines below if you are using www.domain.com
# as the baseurl for the site and users access your site
# via domain.com (THIS IS REQUIRED FOR JQUERY TO WORK)
RewriteCond %{HTTP_HOST} ^yourdomain.com [NC]
RewriteRule ^(.*)$ http://www.yourdomain.com/$1 [L,R=301]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule .* loader.php [L,QSA]
</IfModule>
# Edit below lines and set to
# ErrorDocument CODE /RELATIVE/error.php
# If the script is installed in the default document
# root then relative is null.
#ErrorDocument 401 /error.php
#ErrorDocument 403 /error.php
#ErrorDocument 404 /error.php
其他信息:sql数据库链接成功(已测试)
【问题讨论】:
-
请检查htaccess是否存在?有没有保存网址的表格?您能否分享屏幕截图以获取更多详细信息?
-
@PramodKharade 先生,我编辑了帖子并在我的 avs 脚本文件夹中添加了 htaccess 的代码
-
请帮忙