[提问]
GD空间magento程序地址重写问题 [急]
|
|
安装什么的都正常
只是地址重写出问题了
RewriteBase /
RewriteRule .* index.php [L] (官方默认的,但是肯定是不能运行的,直接500错误)
修改后 RewriteRule .* index.php?/$1 [L]
这样之后 前台能访问了 但是后台 他就又出错了
www.hao123.com 这样正常访问
www.hao123.com/index.php/admin/xxx 直接提示No input file specified.
手动在浏览器上去掉index.php/
www.hao123.com/admin/xxx 这样能访问 但是不能提交数据
很郁闷啊,在本地环境的时候 用magento官方默认配置都能正常运行的
请牛人给一个重写地址规则啊 先谢谢啦
[ 本帖最后由 bkys 于 2010-9-18 04:45 PM 编辑 ] |
|
|
|
|
|
|
|
|
|
|
add.c
发表于 2010-9-18 17:15:10
|
显示全部楼层
|
|
|
|
|
|
|
|
|
|
bkys
发表于 2010-9-18 17:30:49
|
显示全部楼层
版主是好心人啊 我现在使用的是官方默认的.htaccess文件
只是 RewriteBase / 修改成这样的 我是安装在根目录的 |
|
|
|
|
|
|
|
|
|
|
bkys
发表于 2010-9-18 20:18:05
|
显示全部楼层
|
|
|
|
|
|
|
|
|
|
bkys
发表于 2010-9-18 21:43:33
|
显示全部楼层
现在的情况
地址重写出问题了
RewriteBase /
RewriteRule .* index.php [L] (magento官方默认的
这样之后 前台能访问了 但是后台 他就又出错了
www.hao123.com 这样正常访问
www.hao123.com/index.php/admin/xxx 直接提示No input file specified.
手动在浏览器上去掉index.php/
www.hao123.com/admin/xxx 这样能访问 但是不能提交数据
很郁闷啊,在本地环境的时候 用magento官方默认配置都能正常运行的 |
|
|
|
|
|
|
|
|
|
|
bkys
发表于 2010-9-19 00:44:32
|
显示全部楼层
成功解决 看来版主是不可靠的 只能靠自己啊
在这里分享给大家
addhandler x-httpd-php5-cgi .php5
addhandler x-httpd-php5-cgi .php
addhandler x-httpd-php-cgi .php4
############################################
## uncomment these lines for CGI mode
## make sure to specify the correct cgi php binary file name
## it might be /cgi-bin/php-cgi
# Action php5-cgi /cgi-bin/php5-cgi
# AddHandler php5-cgi .php
############################################
## GoDaddy specific options
# Options -MultiViews
## you might also need to add this line to php.ini
## cgi.fix_pathinfo = 1
## if it still doesn't work, rename php.ini to php5.ini
############################################
## this line is specific for 1and1 hosting
#AddType x-mapp-php5 .php
#AddHandler x-mapp-php5 .php
############################################
## default index file
DirectoryIndex index.php
<IfModule mod_php5.c>
############################################
## adjust memory limit
# php_value memory_limit 64M
php_value memory_limit 64M
php_value max_execution_time 18000
############################################
## disable magic quotes for php request vars
php_flag magic_quotes_gpc off
############################################
## disable automatic session start
## before autoload was initialized
php_flag session.auto_start off
############################################
## enable resulting html compression
#php_flag zlib.output_compression on
###########################################
# disable user agent verification to not break multiple image upload
php_flag suhosin.session.cryptua off
###########################################
# turn off compatibility with PHP4 when dealing with objects
php_flag zend.ze1_compatibility_mode Off
</IfModule>
<IfModule mod_security.c>
###########################################
# disable POST processing to not break multiple image upload
SecFilterEngine Off
SecFilterScanPOST Off
</IfModule>
<IfModule mod_deflate.c>
############################################
## enable apache served files compression
## http://developer.yahoo.com/performance/rules.html#gzip
# Insert filter on all content
###SetOutputFilter DEFLATE
# Insert filter on selected content types only
#AddOutputFilterByType DEFLATE text/html text/plain text/xml text/css text/javascript
# Netscape 4.x has some problems...
#BrowserMatch ^Mozilla/4 gzip-only-text/html
# Netscape 4.06-4.08 have some more problems
#BrowserMatch ^Mozilla/4\.0[678] no-gzip
# MSIE masquerades as Netscape, but it is fine
#BrowserMatch \bMSIE !no-gzip !gzip-only-text/html
# Don't compress images
#SetEnvIfNoCase Request_URI \.(?:gif|jpe?g|png)$ no-gzip dont-vary
# Make sure proxies don't deliver the wrong content
#Header append Vary User-Agent env=!dont-vary
</IfModule>
<IfModule mod_ssl.c>
############################################
## make HTTPS env vars available for CGI mode
SSLOptions StdEnvVars
</IfModule>
<IfModule mod_rewrite.c>
############################################
## enable rewrites
Options +FollowSymLinks
RewriteEngine on
############################################
## you can put here your magento root folder
## path relative to web root
RewriteBase /
############################################
## workaround for HTTP authorization
## in CGI environment
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
############################################
## always send 404 on missing files in these folders
RewriteCond %{REQUEST_URI} !^/(media|skin|js)/
############################################
## never rewrite for existing files, directories and links
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-l
############################################
## rewrite everything else to index.php
RewriteRule .* index.php [L]
</IfModule>
############################################
## Prevent character encoding issues from server overrides
## If you still have problems, use the second line instead
AddDefaultCharset Off
#AddDefaultCharset UTF-8
<IfModule mod_expires.c>
############################################
## Add default Expires header
## http://developer.yahoo.com/performance/rules.html#expires
ExpiresDefault "access plus 1 year"
</IfModule>
############################################
## By default allow all access
Order allow,deny
Allow from all
############################################
## If running in cluster environment, uncomment this
## http://developer.yahoo.com/performance/rules.html#etags
#FileETag none |
评分
-
查看全部评分
|
|
|
|
|
|
|
|
|
|
fmourinhoo
发表于 2010-11-21 23:22:12
|
显示全部楼层
|
|
|
|
|
|
|
|