| ||||||||||
Shopping cart software Solutions for online shops and malls | ||||||||||
|
X-Cart Home | FAQ | Forum rules | Calendar | User manuals | Login |
Root HTML Generator | ||||
|
|
Thread Tools | Search this Thread |
#1
|
|||||||||
|
|||||||||
Root HTML Generator
I've had a few people asking me this question so I thought I'd post it up for others.
It's a very simple mod to do, but it is very effective. It basically moves your catalog .html pages into your root directory i.e. http://www.yourdomain.com/index.html instead of http://www.yourdomain.com/catalog/index.html It makes your site much more likely to be spidered by search engines, and increases page rankings by moving them a step closer to root. ---- 1) Download and open the file admin/html_catalog.php in a text editor Find this code: Code:
Change to: Code:
2) Reupload your file. 3) You will then have to give your root directory permission to be written to. This will likely require the directory being chmod'd 666 or 777. Look up "chmod" on the search engines if you are unsure how to do this. 4) You can then login to your admin section, click on HTML Catalog, and generate your new catalog. An index page will be created for your site. --- That's all there is to it. |
|||||||||
#2
|
|||||||||
|
|||||||||
This is really only good for those who run private or dedicated boxes, setting chmod 666 or 777 to your public_html or xcart directory would allow anyone on the shared box to do whatever they like with your files. If this is the case, you can always do something like this after the end of the html catalog generation php file:
Code:
To make the html_catalog file automatically copy the generated html files over once its done.
__________________
Cart-Lab - 100+ Social Bookmarks for X-Cart. |
|||||||||
#3
|
|||||||||
|
|||||||||
Thanks Boomer. I've been on a dedicated box for so long I didn't realize that. I'd assume that the user group permissions would prevent that?
You could also chmod the folder, generate the catalog, and then chmod it back. |
|||||||||
#4
|
|||||||||
|
|||||||||
Quote:
Well, with 777 or 666 you're giving User Group Other <----- Read write (and execute with 777) permissions. So anyone who can log into the machine could write in a directory with 777 permissions. Carrie
__________________
Custom Development, Custom Coding and Pre-built modules for X-cart since 2002! We support X-cart versions 3.x through 5.x! Home of the famous Authorize.net DPM & CIM Modules, Reward Points Module, Point of Sale module, Speed Booster modules and more! Over 200 X-cart Mods available & Thousands of Customizations Since 2002 - bcsengineering.com Please E-Mail us for questions/support! |
|||||||||
#5
|
|||||||||
|
|||||||||
Gotcha. So 755 should do the trick right?
|
|||||||||
#6
|
|||||||||
|
|||||||||
It actually depends on the server set up if 755 would work or not. So hard to say overall. That's why X-cart creates catalog directory with 777 permissions.
So to put html catalog in root, would be best if a copy script were run or something like what Jared suggested. Or go in and chmod to 777 then back to 755 after done. But if you generate your catalog as often as I do, you wouldn't want to do that every time. Carrie
__________________
Custom Development, Custom Coding and Pre-built modules for X-cart since 2002! We support X-cart versions 3.x through 5.x! Home of the famous Authorize.net DPM & CIM Modules, Reward Points Module, Point of Sale module, Speed Booster modules and more! Over 200 X-cart Mods available & Thousands of Customizations Since 2002 - bcsengineering.com Please E-Mail us for questions/support! |
|||||||||
#7
|
|||||||
|
|||||||
Re: Root HTML Generator
Quote:
This method is only for the shops which are installed in the web root directory. But most of the shops (or default XCart setup) is on http://www.yourdomain.com/xcart/, so the method you use will create HTML codes in http://www.yourdomain.com/xcart/. You can only use as http://www.yourdomain.com/xcart/index.html Quote:
__________________
Carts n Tools.com - New Root HTML Generator - Templates | Add-Ons | Services - XCart 4.0.x |
|||||||
#8
|
|||||||
|
|||||||
not so simple
It sounded simple until I tried looking for the $catalog_dir_name = "catalog"; in the admin/html_catalog.php file.
I'm using Gold v.4.0.6 and can't find this line? Any ideas? Robert |
|||||||
#9
|
|||||||||
|
|||||||||
Re: not so simple
Quote:
Look for this instead: Code:
Carrie
__________________
Custom Development, Custom Coding and Pre-built modules for X-cart since 2002! We support X-cart versions 3.x through 5.x! Home of the famous Authorize.net DPM & CIM Modules, Reward Points Module, Point of Sale module, Speed Booster modules and more! Over 200 X-cart Mods available & Thousands of Customizations Since 2002 - bcsengineering.com Please E-Mail us for questions/support! |
|||||||||
#10
|
|||||||
|
|||||||
not quite root
I change the line define ('DIR_CATALOG', '/catalog'); to read ('DIR_CATALOG', ''); but it then wants to put the hmtl pages in /public_html/store rather than in the root directory /public_html ?
I have the ordinary files in the /public_html/store directory. Any ideas? Thanks Robert |
|||||||
|
|||
X-Cart forums © 2001-2020
|