如何去掉url里面的文件夹名字?

Zen Cart的安装、设置、升级讨论和使用技巧交流

版主: shaning

zencart 发帖图标 如何去掉url里面的文件夹名字?

帖子新手568 » 2016-04-16 22:48

新手一枚,求大神帮忙:
我的zencart建站在:public_html/zencart 文件夹下面,
用htaccess文件做了域名定向到子目录,现在域名显示:www.1234.com/zencart 如何把url里面的zencart去掉呢?

htaccess 文件如下:
# Use PHPBETA as default
AddHandler application/x-httpd-phpbeta .php
# Bluehost.com
# .htaccess main domain to zencart redirect
# Copy and paste the following code into the .htaccess file
# in the public_html folder of your hosting account
# make the changes to the file according to the instructions.
# Do not change this line.
RewriteEngine on
# Change 1234.com to be your main domain.
RewriteCond %{HTTP_HOST} ^(www.)?1234.com$
# Change 'zencart' to be the directory you will use for your main domain.
RewriteCond %{REQUEST_URI} !^/zencart/
# Don't change these line.
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
# Change 'zencart' to be the directory you will use for your main domain.
RewriteRule ^(.*)$ /zencart/$1
# Change 1234.com to be your main domain again.
# Change 'zencart' to be the directory you will use for your main domain
# followed by / then the main file for your site, index.php, index.html, etc.
RewriteCond %{HTTP_HOST} ^(www.)?1234.com$
RewriteRule ^(/)?$ zencart/ [L]
新手568
 
帖子: 2
注册: 2016-04-07 17:15

Re: 如何去掉url里面的文件夹名字?

帖子leo88 » 2016-04-24 2:13

这个我也想知道!~
leo88
普通会员
普通会员
 
帖子: 39
注册: 2010-07-10 11:10
地址: http://www.rcdronesky.com


  • 相关话题
    回复总数
    阅读次数
    最新文章

回到 安装设置



在线用户

正在浏览此版面的用户:没有注册用户 和 0 位游客