raksmart活动促销

分享

写回答

发帖

又是伪静态 問題....

国外虚拟主机 国外虚拟主机 3925 人阅读 | 12 人回复

发表于 2009-5-7 16:45:03 | 显示全部楼层 |阅读模式

shopex安裝在www.abc.com/cdf
后台"静态URL"不能打开,只自己在子目上加上".htaccess",
abc是根目录,cdf是子目录,访问名是www.cdf.com
问题是
1)下面的htaccess有否写错?
2)如何知道URL rewrite是否打开?
3)访问www.cdf.com时显示www.cdf.com/?,有"?"是否代表URL rewrite还未打开?
请帮忙!谢谢!
内容如下:

#$Id: root.htaccess 17348 2008-12-23 05:53:22Z flaboy $

AddEncoding gzip .jgz
AddType "text/javascript;charset=UTF-8" .jgz

AddEncoding gzip .zcss
AddType "text/css;charset=UTF-8" .zcss

<IfModule mod_rewrite.c>

Options +FollowSymLinks
RewriteEngine on
RewriteCond %{HTTP_HOST} ^www.abc.com/cdf/ [NC]
RewriteRule ^(.*)$ http://www.cdf.com/$1 [L,R=301]


#设置RewriteBase的值为你的商店目录地址
RewriteBase /abc.com/cdf

RewriteRule ^themes/.*\.(html|xml)$ / [F]

RewriteRule ^archiver/([a-z0-9\-]+\.html)$ archiver/index.php?$1

RewriteRule ^forum-([0-9]+)-([0-9]+)\.html$ forumdisplay.php?fid=$1&page=$2

RewriteRule ^thread-([0-9]+)-([0-9]+)-([0-9]+)\.html$ viewthread.php?tid=$1&extra=page\%3D$4&page= $2

RewriteRule ^profile-(username|uid)-(.*)\.html$ viewpro.php?$1=$2

RewriteCond%{REQUEST_FILENAME}\.(html|xml|json|htm|php|php2|php3|php4|php5|phtml|pwml|inc|asp|aspx|ascx|jsp|cfm|cfc|pl|cgi|shtml|shtm|phtm)$
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?$1 [L]
</IfModule>

<IfModule mod_security.c>
SecFilterEngine Off
SecFilterScanPOST Off
</IfModule>

AddHandler x-httpd-php .html .htm

回答|共 12 个

一路同行

发表于 2009-5-7 16:55:39 | 显示全部楼层

哪个版本的?伪静态,shopex后台就可以开启吧

kennychui

发表于 2009-5-7 17:04:15 | 显示全部楼层

我的主目录安装了一个shopex474,有htaccess文件的.
子目录shopex484下又有一个htaccess文件,是否这样做?
shopex484后台,后台"静态URL"不能打开.--您的系统存在无效的.htaccess,无法启用伪静态
后台关于内的"服务器信息"显示--支持rewrite不支持

[ 本帖最后由 kennychui 于 2009-5-7 05:16 PM 编辑 ]

一路同行

发表于 2009-5-7 17:13:00 | 显示全部楼层

.htaccess放在shopex安装目录吗?
应该这样: RewriteBase /

kennychui

发表于 2009-5-7 17:24:20 | 显示全部楼层

www.abc.com下安裝shopex474,有一個htaccess,應該巳打開伪静态.
www.abc.com/cdf 新安裝shopex484,又有一個htaccess,但是打不開,如上面所寫的,
這個問題巳弄了兩個多月了.
另"应该这样: RewriteBase /"能否清楚一點點.
請版主多多幫忙!謝謝!

一路同行

发表于 2009-5-7 17:26:01 | 显示全部楼层

#设置RewriteBase的值为你的商店目录地址
RewriteBase /

RewriteRule ^themes/.*\.(html|xml)$ / [F]

RewriteRule ^archiver/([a-z0-9\-]+\.html)$ archiver/index.php?$1

RewriteRule ^forum-([0-9]+)-([0-9]+)\.html$ forumdisplay.php?fid=$1&page=$2

RewriteRule ^thread-([0-9]+)-([0-9]+)-([0-9]+)\.html$ viewthread.php?tid=$1&extra=page\%3D$4&page= $2

RewriteRule ^profile-(username|uid)-(.*)\.html$ viewpro.php?$1=$2

RewriteCond%{REQUEST_FILENAME}\.(html|xml|json|htm|php|php2|php3|php4|php5|phtml|pwml|inc|asp|aspx|ascx|jsp|cfm|cfc|pl|cgi|shtml|shtm|phtm)$
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?$1 [L]

kennychui

发表于 2009-5-7 17:31:56 | 显示全部楼层

巳試了,出現500

Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator, webmaster@sunnytsuijewelry.com and inform them of the time the error occurred, and anything you might have done that may have caused the error.

More information about this error may be available in the server error log.

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.
Apache/2.0.63 (Unix) mod_ssl/2.0.63 OpenSSL/0.9.7a mod_auth_passthrough/2.1 mod_bwlimited/1.4 FrontPage/5.0.2.2635 Server at www.sunnytsuijewelry.com Port 80

一路同行

发表于 2009-5-7 17:41:41 | 显示全部楼层

看看htaccess文件中有没包含php_values 和 php_flags

在.htaccess里添加
suPHP_ConfigPath /home/username/public_html
username是你主机用户名

kennychui

发表于 2009-5-7 17:51:21 | 显示全部楼层

都是500,如下:
RewriteBase /sunnytsuijewelry.com/smartplan/

RewriteRule ^themes/.*\.(html|xml)$ / [F]

RewriteRule ^archiver/([a-z0-9\-]+\.html)$ archiver/index.php?$1

RewriteRule ^forum-([0-9]+)-([0-9]+)\.html$ forumdisplay.php?fid=$1&page=$2

RewriteRule ^thread-([0-9]+)-([0-9]+)-([0-9]+)\.html$ viewthread.php?tid=$1&extra=page\%3D$4&page= $2

RewriteRule ^profile-(username|uid)-(.*)\.html$ viewpro.php?$1=$2


RewriteCond%{REQUEST_FILENAME}\.(html|xml|json|htm|php|php2|php3|php4|php5|phtml|pwml|inc|asp|aspx|ascx|jsp|cfm|cfc|pl|cgi|shtml|shtm|phtm)$
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?$1 [L]

suPHP_ConfigPath /home/sunny28/public_html

一路同行

发表于 2009-5-7 17:52:34 | 显示全部楼层

这是哪个.htaccess?
把.htaccess文件里的内容全部贴上来看看
您需要登录后才可以回帖 登录 | 注册

本版积分规则