关于apache .htaccess 伪静态页路径问题
版主,各位仁兄好!
我伪静态页的地址比指定动态页多了一个目录,导致样式读不到,图片打不开,请问怎么设置可以正常打开?
伪静态页的地址: http://211.166.45.10/company/new/new_10000.html
指定的动态地址:http://211.166.45.10/company/new.php?id=10000
动态文件里的代码:
样式: <link href="css/css.css" type="text/css" rel="stylesheet" />
图片:<img src="images/an17.jpg" width="58" height="25" />
apache httpd.conf 设置:
LoadModule rewrite_module libexec/apache22/mod_rewrite.so
Options FollowSymLinks
AllowOverride All
Alias "/company" "/usr/local/www/company/httpdocs/"
<Directory "/usr/local/www/company/httpdocs/">
Order Allow,Deny
Allow from all
</Directory>
.htaccess 设置:
rewriteengine on
RewriteBase /company/
RewriteRule /new/new_([0-9]{1,})\.html$ new.php?id=$1
之前用的是真实的静态页,已经收录了20000多页面,所以伪静态只能用http://211.166.45.10/company/new/new_10000.html这种地址,但new.php 在根目录下,与伪静态地址差了一个目录,请问怎样设置可以正常打开样式和图片? |