Htaccess CSS不被识别和断开链接



我有一个问题与我的。htaccess,我的css不被识别,和所有的链接被打破…我在同一个主机上有两个域名注册,

(如数字1和数字2)

我已经设法使数字2与这个。haccess完美地工作,它位于:/number2domain/

#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

然而,我没有设法使工作编号1,它位于/httpdocs/home/

我保留了。haccess重写

RewriteBase /

RewriteBase /httpdocs/home/

但它没有改变任何东西…

在我的配置文件中,即:

<?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;
}

我已经改变了路径,或者保持之前的路径(

)
$_CONFIG['Website_folder'] = '/';

}

任何高光都会很精彩…

Thank you so much

你的相对url是坏的,要么添加一个/到你所有的链接,图像,样式,脚本等,或添加到你的页面标题:

<base href="/" />

(或可能)
<base href="http://lamett.com.gt/" />

最新更新