Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/.htaccess/6.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
.htaccess htaccess css无法识别,链接已断开_.htaccess - Fatal编程技术网

.htaccess htaccess css无法识别,链接已断开

.htaccess htaccess css无法识别,链接已断开,.htaccess,.htaccess,我的.htaccess有问题,我的css无法识别,所有链接都已断开。 我在同一主机上注册了两个域名 例如1号和2号 我已经设法使第二个功能与位于:/number2domain中的.htacess完美结合/ #Fix Rewrite Options -Multiviews <Files ~ "^.(htaccess|htpasswd)$"> deny from all </Files> Options +FollowSymLinks RewriteEngine On R

我的.htaccess有问题,我的css无法识别,所有链接都已断开。 我在同一主机上注册了两个域名

例如1号和2号

我已经设法使第二个功能与位于:/number2domain中的.htacess完美结合/

#Fix Rewrite
Options -Multiviews


<Files ~ "^.(htaccess|htpasswd)$">
deny from all
</Files>
Options +FollowSymLinks
RewriteEngine On
RewriteBase /
RewriteRule ^admin/.*$ - [PT]
RewriteRule ^css/.*$ - [PT]
RewriteRule ^js/.*$ - [PT]
RewriteRule ^files/.*$ - [PT]
Options -Indexes
<FilesMatch ".(gif|jpg|jpeg|png|ico)$">
Header set Cache-Control "max-age=3600"
</FilesMatch>


RewriteRule ^(\w+)/rss?$ rss.php?lang=$1

RewriteBase /
RewriteRule ^(\w+)/product/(\w+)/(\w+)/(\w+)?$ index.php?type=product&category=$2&subcategory=$3&product=$4&lang=$1
RewriteRule ^(\w+)/product/(\w+)/(\w+)?$ index.php?type=product&category=$2&subcategory=$3&lang=$1
RewriteRule ^(\w+)/product/(\w+)?$ index.php?type=product&category=$2&lang=$1
RewriteRule ^(\w+)/project/(\w+)/(\w+)?$ index.php?toptype=project&type=$2&lang=$1&ext=$3
RewriteRule ^(\w+)/project/(\w+)?$ index.php?toptype=project&type=$2&lang=$1
RewriteRule ^(\w+)/(\w+)/page-(\w+)?$ index.php?type=$2&page=$3&lang=$1
RewriteRule ^(\w+)/(\w+)/(\w+)?$ index.php?toptype=$2&type=$3&lang=$1
RewriteRule ^(\w+)/(\w+)?$ index.php?type=$2&lang=$1


#ErrorDocument 400 ./error/400.html
#ErrorDocument 404 ./error/404.html
DirectoryIndex index.html index.php      
order deny,allow

但这不会改变任何事情

在我的配置文件中,它是:

<?php

if (!defined('_CONFIG_INC_PHP'))
{
    define('_CONFIG_INC_PHP', 1);
    if($_SERVER['HTTP_HOST'] == 'localhost'){
        $_CONFIG['MysqlHostname'] = 'hostname';   // host name
        $_CONFIG['MysqlUsername'] = 'user';        // username access to mysql
        $_CONFIG['MysqlPassword'] = 'pass';      // password access to mysql
        $_CONFIG['MysqlDatabase'] = 'dbname';
        $_CONFIG['Website_host'] = 'http://domain1.com./';
        $_CONFIG['Website_folder'] = '/httpdocs/home/';

    }else{
        $_CONFIG['MysqlHostname'] = 'hostname';   // host name
        $_CONFIG['MysqlUsername'] = 'user';        // username access to mysql
        $_CONFIG['MysqlPassword'] = 'pass';      // password access to mysql
        $_CONFIG['MysqlDatabase'] = 'dbname';
        $_CONFIG['Website_host'] = 'http://domain1.com./';
        $_CONFIG['Website_folder'] = '/httpdocs/home/';
    }
    $_CONFIG['MysqlCharset'] = 'UTF8';
    $_CONFIG['PageCharset'] = 'UTF-8';
    $_CONFIG['TablePrefix'] = 'lam_';
    $_CONFIG['SitePrefix'] = 'CMS_';
    $_CONFIG['ImageResize'] = '1';
    $_CONFIG['UploadRename'] = '0';
    $_CONFIG['ThumbnailsWidth'] = '140';
    $_CONFIG['SEOFile'] = 'seo.xml';
    $_CONFIG['WEBSITE'] = 'domain1.com.gt';
    $_CONFIG['DefaultLanguage'] = '1';
    $_CONFIG['Email'] = 'mail';
    $_CONFIG['Trace'] = false;
}
}

任何海力特都会非常棒


非常感谢您

您的相对URL已断开,请将a/添加到所有链接、图像、样式、脚本等,或将其添加到页面标题:

<base href="/" />
或者可能

<base href="http://lamett.com.gt/" />

CSS的正确路径是什么?您如何将其包含在页面中?路径位于:httpdocs/home/style/it's in the index.php as:So working CSS path应该是http://example.com//home/css/style/style.css ?它不会改变任何东西,它是;这是htacess设置的问题,但我无法管理哪一个:在我给出的ej中,第二个使用完全相同的文件和框架,只是路径和某些内容两者都不同……你错了。我并没有给你们答案,只是问一些问题来理解你们的CSS文件的完整工作URL是什么。。我已将其添加到头文件的顶部..:
$_CONFIG['Website_folder'] = '/';
<base href="/" />
<base href="http://lamett.com.gt/" />