我尝试在localhost/justborngarments
上运行此网站,但它始终会重定向到实时网站www.justborngarments.com。我该如何解决这个问题?
的config.php
<?php
ini_set("display_errors", "0");
error_reporting(0);
// HTTP
define('HTTP_SERVER', 'http://localhost/justborngarments/');
// HTTPS
define('HTTPS_SERVER', 'http://localhost/justborngarments/');
// DIR
define('DIR_APPLICATION', 'D:\xampp\htdocs\Justborngarments/catalog/');
define('DIR_SYSTEM', 'D:\xampp\htdocs\Justborngarments/system/');
define('DIR_DATABASE', 'D:\xampp\htdocs\Justborngarments/system/database/');
define('DIR_LANGUAGE', 'D:\xampp\htdocs\Justborngarments/catalog/language/');
define('DIR_TEMPLATE', 'D:\xampp\htdocs\Justborngarments/catalog/view/theme/');
define('DIR_CONFIG', 'D:\xampp\htdocs\Justborngarments/system/config/');
define('DIR_IMAGE', 'D:\xampp\htdocs\Justborngarments/image/');
define('DIR_CACHE', 'D:\xampp\htdocs\Justborngarments/system/cache/');
define('DIR_DOWNLOAD', 'D:\xampp\htdocs\Justborngarments/download/');
define('DIR_LOGS', 'D:\xampp\htdocs\Justborngarments/system/logs/');
// DB
define('DB_DRIVER', 'mysql');
define('DB_HOSTNAME', 'localhost');
define('DB_USERNAME', 'root');
define('DB_PASSWORD', '');
define('DB_DATABASE', 'justborn_db');
define('DB_PREFIX', 'jo_');
?>
htaccess的
Options +FollowSymlinks
# Prevent Directoy listing
Options -Indexes
# Prevent Direct Access to files
<FilesMatch "\.(tpl|ini|log)">
Order deny,allow
Deny from all
</FilesMatch>
# SEO URL Settings
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^([^?]*) index.php?_route_=$1 [L,QSA]
RewriteCond %{QUERY_STRING} ^_route_=common/home$
RewriteRule ^index\.php$ http://www.justborngarments.com/? [R=301,L]
答案 0 :(得分:0)
.htaccess文件的最后一行包含您的实时域名:http://www.justborngarments.com/
。
尝试将其更改为您当地的网络服务器网址:
http://localhost/justborngarments