网络营销电子商务研究中心  
How to buy the best prescription safety glasses in Canada? Let's study!
Go Back   网络营销电子商务研究中心 > 网站建设 > ZenCart
User Name
Password
 
FAQ Members List Calendar Cheap Glasses Mark Forums Read

Reply
 
Thread Tools Display Modes
  #1   IP: 114.238.1.126
Old 2016-01-22, 11:09 PM
Sabrina Sabrina is offline
初级会员
 
Join Date: 2006-11-14
Posts: 1
Sabrina 现在声名狼藉
Default zencart怎么删除URL后面带有一串&zenid

SEO的URL路径是很重要的.比如一个网站的内页路径最好是被关键字,层次分明,以.html结束,例如:http://www.XXXXX.com/产品分类名/产品名称(或是加一些自己所需要的关键词).html.但是zencart系统就只会不会让你如意,要进行一些修改后,才可以变成你想要的URL结果.下面的步骤就是讲怎么来现实这个效果,从而达到SEO理想化状态.

1.首要将网页进行静态化,而zencart是使用的伪静态技术.很把网站打个包上传到FTP空间,然后进行解压.配置好后将根目录的htaccess_sample用记事本打开,将文件另存为”.htacces”,打开文件改里面相对就的内容(改的地名有注释):

##### NOTE: Replace /shop/ with the relative web path of your catalog in the “Rewrite Base” line below:

Options +FollowSymLinks

RewriteEngine On

RewriteBase /shop/ (这里如果是根目录就改成’ RewriteBase /’,如果不是就改成’ RewriteBase /文件夹名称/’)

# From Ultimate SEO URLs

RewriteRule ^(.*)-p-(.*).html$ index.php?main_page=product_info&products_id=$2&%{QUERY_STRING} [L]

RewriteRule ^(.*)-c-(.*).html$ index.php?main_page=index&cPath=$2&%{QUERY_STRING} [L]

RewriteRule ^(.*)-m-([0-9]+).html$ index.php?main_page=index&manufacturers_id=$2&%{QUERY_STRING} [L]

RewriteRule ^(.*)-pi-([0-9]+).html$ index.php?main_page=popup_image&pID=$2&%{QUERY_STRING} [L]

RewriteRule ^(.*)-pr-([0-9]+).html$ index.php?main_page=product_reviews&products_id=$2&%{QUERY_STRING} [L]

RewriteRule ^(.*)-pri-([0-9]+).html$ index.php?main_page=product_reviews_info&products_id=$2&%{QUERY_STRING} [L]

# For Open Operations Info Manager

RewriteRule ^(.*)-i-([0-9]+).html$ index.php?main_page=info_manager&pages_id=$2&%{QUERY_STRING} [L]

# For dreamscape’s News & Articles Manager

RewriteRule ^news/?$ index.php?main_page=news&%{QUERY_STRING} [L]

RewriteRule ^news/rss.xml$ index.php?main_page=news_rss&%{QUERY_STRING} [L]

RewriteRule ^news/archive/?$ index.php?main_page=news_archive&%{QUERY_STRING} [L]

RewriteRule ^news/([0-9]{4})-([0-9]{2})-([0-9]{2}).html$ index.php?main_page=news&date=$1-$2-$3&%{QUERY_STRING} [L]

RewriteRule ^news/archive/([0-9]{4})-([0-9]{2}).html$ index.php?main_page=news_archive&date=$1-$2&%{QUERY_STRING} [L]

RewriteRule ^news/(.*)-a-([0-9]+)-comments.html$ index.php?main_page=news_comments&article_id=$2&%{QUERY_STRING} [L]

RewriteRule ^news/(.*)-a-([0-9]+).html$ index.php?main_page=news_article&article_id=$2&%{QUERY_STRING} [L]

# All other pages

# Don’t rewrite real files or directories

RewriteCond %{REQUEST_FILENAME} !-f [NC]

RewriteCond %{REQUEST_FILENAME} !-d

RewriteRule ^(.*).html$ index.php?main_page=$1&%{QUERY_STRING} [L]

2.进入后台,选择” Configuration->搜索引擎优化”,单击” 打开搜索引擎优化吗?”在右边选择”ture->update”.这样就将zencart静态化了,不过还差后台的&zenid.

3.打开文件” includes/functions/html_output.php”修改如下:

function original_zen_href_link($page = ”, $parameters = ”, $connection = ‘NONSSL’, $add_session_id = true, $search_engine_safe = true, $static = false, $use_dir_ws_catalog = true)

改成

function original_zen_href_link($page = ”, $parameters = ”, $connection = ‘NONSSL’, $add_session_id = false, $search_engine_safe = true, $static = false, $use_dir_ws_catalog = true)

function zen_href_link($page = ”, $parameters = ”, $connection = ‘NONSSL’, $add_session_id = true, $search_engine_safe = true, $static = false, $use_dir_ws_catalog = true) {

改成

function zen_href_link($page = ”, $parameters = ”, $connection = ‘NONSSL’, $add_session_id = false, $search_engine_safe = true, $static = false, $use_dir_ws_catalog = true) {

4.保存,刷新页面即可.
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Prescription-glasses.com offers prescription glasses online at discount prices.
All times are GMT +8. The time now is 01:58 AM.


Powered by vBulletin Version 3.8.7
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.