Zen Cart Logo
Forums / All Other Contributions/Addons / Simple SEO URL (OLD version) [support thread]

Simple SEO URL (OLD version) [support thread]

Views: 1,113,830

Results 2,421 to 2,440 of 5,058
20 Feb 2009, 11:32 PM
#2421
peteboy avatar

peteboy

New Zenner

Join Date:
Feb 2009
Posts:
27
Plugin Contributions:
0

Simple SEO URL (OLD version) [support thread]

yellow1912:

If you can provide us a link, I can check the site.
I came from a C background as well, but again imagine you have to code a website with C, I dont think it's fun :). Surely php is slower than C, but we are not doing any heavy computing here, the difference is not noticeable.

Zencart, I believe, does have bar-code module working as well.

I am afraid I don't have a link available, I'm just setting up the site on a vmware test system. I may be uploading it to a fasthosts server in the next few weeks, but there are loads of things to get cleared like supplier details, security audit, and testing.

I have been told there will be a total of around 8,000 products from 20 suppliers and I will be given images and spreadsheet data to put in the system next week. I want to get a basic system setup before I start adding the data. My problem seems to have been fixed by commenting out :

#Options +FollowSymLinks -MultiViews

from the .htaccess file.

Of course if that line works OK for others it still leaves the question why it breaks my system, I guess due to some apache config issues.

As I said the system is a stock centos 5 system so other centos users may have the same problem.

I will post back when I have uploaded to the fasthosts server, which should as far as I could manage have an identical config to the vmware test system I created.

Or if you are really interested I could put the vmware image up for you to download and test (though it would be a 600Mb image).

I did start to write a webshop system in C almost 10 years ago, but dumped the whole idea for what seemed like a far more elegant system written in C, which then never got used due to SEO problems and javascript weaknesses.

I think its all the $ chars before variables that puts me off php?.

Anyway thanks for the help, I will post back if I get to the root of the problem.

21 Feb 2009, 12:06 AM
#2422
craft_magick avatar

craft_magick

Zen Follower

Join Date:
Nov 2007
Posts:
166
Plugin Contributions:
0

Re: Simple SEO URL (OLD version) [support thread]

yellow1912:

If you get redirection in admin, try this:
http://wiki.rubikintegration.com/zencart/modules/ssu/troubleshootings/admin_redirection_loop

Again, the wiki has tons of useful info, it takes tons of time to build up those pages as well, so please check the wiki first when you run into a problem. Usually the solution is there.

My redirect is during customer login on the storefront side but I'll check the wiki as you suggest in case an admin redirect solution may solve it.

Here's the website
http://www.CraftMagick.com

21 Feb 2009, 12:12 AM
#2423
craft_magick avatar

craft_magick

Zen Follower

Join Date:
Nov 2007
Posts:
166
Plugin Contributions:
0

Re: Simple SEO URL (OLD version) [support thread]

Craft Magick:

My redirect is during customer login on the storefront side but I'll check the wiki as you suggest in case an admin redirect solution may solve it.

Here's the website
http://www.CraftMagick.com

Found this in the wiki

Have you ever checked if your site can be visited at both links: http://yoursite.com AND http://www.yoursite.com If not, try it, I recommend that you try it now.

Some search engines may view site.com and www.site.com as being two different URLs. If you split your link popularity amongst both versions, you will have less authority on each version than if the two were combined.

So it is recommended that you pick one style and stick with it
Redirection

To do the redirection, [B]add the code below to your .htaccess (right below the RewriteBase line)[/B]

Don't forget to change example.com to your domain name

From none-www to www

# trailing slash
# If URL-path does not contain a period or end with a slash
#RewriteCond %{REQUEST_URI} !(\.|/$)
# add a trailing slash
#RewriteRule (.*) http://www.example.com/$1/ [R=301,L]
#
# Redirect non-www domain requests to www domain
RewriteCond %{HTTP_HOST} ^example\.
RewriteRule (.*) http://www.example.com/$1 [R=301,L]

From www to none-www

# trailing slash
# If URL-path does not contain a period or end with a slash
#RewriteCond %{REQUEST_URI} !(\.|/$)
# add a trailing slash
# RewriteRule .* http://example.com%{REQUEST_URI}/ [R=301,L]
#
# Canonicalize the domain
# Redirect non-www domain requests to www domain
RewriteCond %{HTTP_HOST} ^www\.example\.
RewriteRule (.*) http://example.com%{REQUEST_URI} [R=301,L]

Is the .htaccess file it refers to the top level (i.e. MYDOMAIN/.htaccess ??

or is it refering to an .htaccess in a subfolder somewhere ??

21 Feb 2009, 12:43 AM
#2424
countrycharm avatar

countrycharm

Totally Zenned

Join Date:
Jul 2007
Posts:
2,179
Plugin Contributions:
2

Re: Simple SEO URL (OLD version) [support thread]

Craft Magick:

Found this in the wiki

Have you ever checked if your site can be visited at both links: http://yoursite.com AND http://www.yoursite.com If not, try it, I recommend that you try it now.

Some search engines may view site.com and www.site.com as being two different URLs. If you split your link popularity amongst both versions, you will have less authority on each version than if the two were combined.

So it is recommended that you pick one style and stick with it
Redirection

To do the redirection, [B]add the code below to your .htaccess (right below the RewriteBase line)[/B]

Don't forget to change example.com to your domain name

From none-www to www

trailing slash

If URL-path does not contain a period or end with a slash

#RewriteCond %{REQUEST_URI} !(.|/$)

add a trailing slash

#RewriteRule (.*) http://www.example.com/$1/ [R=301,L]

Redirect non-www domain requests to www domain

RewriteCond %{HTTP_HOST} ^example.
RewriteRule (.*) http://www.example.com/$1 [R=301,L]

From www to none-www

trailing slash

If URL-path does not contain a period or end with a slash

#RewriteCond %{REQUEST_URI} !(.|/$)

add a trailing slash

RewriteRule .* http://example.com%{REQUEST_URI}/ [R=301,L]

Canonicalize the domain

Redirect non-www domain requests to www domain

RewriteCond %{HTTP_HOST} ^www.example.
RewriteRule (.*) http://example.com%{REQUEST_URI} [R=301,L]

> 
> Is the .htaccess file it refers to the top level (i.e. MYDOMAIN/.htaccess ??
> 
> or is it refering to an .htaccess in a subfolder somewhere ??

In your root directory on your server. Just add this to it like mine below.. Put your web address there not mine....lol

> RewriteCond %{HTTP_HOST} ^thegoodshepherdstore.com$ [NC]
> RewriteRule ^(.*)$ http://www.thegoodshepherdstore.com/$1[R=301,L]
#### BOF SSU
Options +FollowSymLinks -MultiViews
RewriteEngine On
RewriteCond %{HTTP_HOST} ^thegoodshepherdstore.com$ [NC]
RewriteRule ^(.*)$ http://www.thegoodshepherdstore.com/$1 [R=301,L]

# Make sure to change "test_site" to the subfolder you install ZC. If you use root folder, change to: RewriteBase / 
RewriteBase /

# Deny access from .htaccess
RewriteRule ^\.htaccess$ - [F]

RewriteCond %{SCRIPT_FILENAME} !-f
RewriteCond %{SCRIPT_FILENAME} !-d
RewriteRule ^(.*) index.php?/$1 [E=VAR1:$1,QSA,L]
#### EOF SSU
21 Feb 2009, 1:13 AM
#2425
craft_magick avatar

craft_magick

Zen Follower

Join Date:
Nov 2007
Posts:
166
Plugin Contributions:
0

Re: Simple SEO URL (OLD version) [support thread]

countrycharm:

In your root directory on your server. Just add this to it like mine below.. Put your web address there not mine....lol

[R=301,L]

BOF SSU

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

Thank you. I modified .htaccess as you describe above and here's a copy

RewriteRule ^(.*) index.php?/$1 [E=VAR1:$1,QSA]

# STRIP THE REWRITEBASE RULE FROM NON-SSL CONNECTIONS.
RewriteCond %{SERVER_PORT} 80
RewriteCond %{REQUEST_URI} ^/craftmagick/
RewriteRule ^(.*) /index.php?/$1 [E=VAR1:$1,QSA,L]
#### EOF SSU

# trailing slash
# If URL-path does not contain a period or end with a slash
#RewriteCond %{REQUEST_URI} !(\.|/$)
# add a trailing slash
#RewriteRule (.*) http://www.example.com/$1/ [R=301,L]
#
# Redirect non-www domain requests to www domain
RewriteCond %{HTTP_HOST} ^craftmagick.com\.
RewriteRule (.*) http://www.craftmagick.com/$1 [R=301,L]

Unfortunately I'm still getting the Redirect Loop error when customers try to login...

and SOMETIMES now ( though not always) just hitting the BACK button on the browser takes you back into the store and you are already logged in when arriving back.

But sometimes NOT... and when that happens you have to re-enter the store URL in your browser and upon arriving at the store you're already logged in :frusty:

Running Zen version 1.3.8a
Here's a link to my site if anyone has any suggestions
http://www.craftmagick.com

21 Feb 2009, 1:14 AM
#2426
yellow1912 avatar

yellow1912

Totally Zenned

Join Date:
Oct 2006
Posts:
5,422
Plugin Contributions:
0

Re: Simple SEO URL (OLD version) [support thread]

What is your SSU version btw?
And please post FULL htaccess and configure.php (no password)

21 Feb 2009, 1:27 AM
#2427
peteboy avatar

peteboy

New Zenner

Join Date:
Feb 2009
Posts:
27
Plugin Contributions:
0

Re: Simple SEO URL (OLD version) [support thread]

countrycharm:

In your root directory on your server. Just add this to it like mine below.. Put your web address there not mine....lol

[R=301,L]

BOF SSU

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

Make sure to change "test_site" to the subfolder you install ZC. If you use root folder, change to: RewriteBase /

RewriteBase /

Deny access from .htaccess

RewriteRule ^.htaccess$ - [F]

RewriteCond %{SCRIPT_FILENAME} !-f
RewriteCond %{SCRIPT_FILENAME} !-d
RewriteRule ^(.*) index.php?/$1 [E=VAR1:$1,QSA,L]

EOF SSU

That is a mod_rewrite 301 permanent redirect:

http://httpd.apache.org/docs/2.0/mod/mod_rewrite.html

but I found the link below more readable if you want to workout how regexps work:

http://forums.digitalpoint.com/showthread.php?t=504361

"Any sufficiently advanced technology is indistinguishable from magic."

21 Feb 2009, 1:39 AM
#2428
craft_magick avatar

craft_magick

Zen Follower

Join Date:
Nov 2007
Posts:
166
Plugin Contributions:
0

Re: Simple SEO URL (OLD version) [support thread]

yellow1912:

What is your SSU version btw?
And please post FULL htaccess and configure.php (no password)

SSU version 3-5-8

here's the includes/config.php file

<?php
/**
 * @package Configuration Settings circa 1.3.8
 * @copyright Copyright 2003-2007 Zen Cart Development Team
 * @copyright Portions Copyright 2003 osCommerce
 * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
 */


/*************** NOTE: This file is similar, but DIFFERENT from the "admin" version of configure.php. ***********/
/***************       The 2 files should be kept separate and not used to overwrite each other.      ***********/

// Define the webserver and path parameters
  // HTTP_SERVER is your Main webserver: eg-http://www.your_domain.com
  // HTTPS_SERVER is your Secure webserver: eg-https://www.your_domain.com
  define('HTTP_SERVER', 'http://www.craftmagick.com');
  define('HTTPS_SERVER', 'https://www.zencrystals.com');

  // Use secure webserver for checkout procedure?
  define('ENABLE_SSL', 'true');

// NOTE: be sure to leave the trailing '/' at the end of these lines if you make changes!
// * DIR_WS_* = Webserver directories (virtual/URL)
  // these paths are relative to top of your webspace ... (ie: under the public_html or httpdocs folder)
  define('DIR_WS_CATALOG', '/');
  define('DIR_WS_HTTPS_CATALOG', '/craftmagick/');

  define('DIR_WS_IMAGES', 'images/');
  define('DIR_WS_INCLUDES', 'includes/');
  define('DIR_WS_FUNCTIONS', DIR_WS_INCLUDES . 'functions/');
  define('DIR_WS_CLASSES', DIR_WS_INCLUDES . 'classes/');
  define('DIR_WS_MODULES', DIR_WS_INCLUDES . 'modules/');
  define('DIR_WS_LANGUAGES', DIR_WS_INCLUDES . 'languages/');
  define('DIR_WS_DOWNLOAD_PUBLIC', DIR_WS_CATALOG . 'pub/');
  define('DIR_WS_TEMPLATES', DIR_WS_INCLUDES . 'templates/');

  define('DIR_WS_PHPBB', '/');

// * DIR_FS_* = Filesystem directories (local/physical)
  //the following path is a COMPLETE path to your Zen Cart files. eg: /var/www/vhost/accountname/public_html/store/
  define('DIR_FS_CATALOG', '/home/zencryst/public_html/craftmagick/');

  define('DIR_FS_DOWNLOAD', DIR_FS_CATALOG . 'download/');
  define('DIR_FS_DOWNLOAD_PUBLIC', DIR_FS_CATALOG . 'pub/');
  define('DIR_WS_UPLOADS', DIR_WS_IMAGES . 'uploads/');
  define('DIR_FS_UPLOADS', DIR_FS_CATALOG . DIR_WS_UPLOADS);
  define('DIR_FS_EMAIL_TEMPLATES', DIR_FS_CATALOG . 'email/');

// define our database connection
  define('DB_TYPE', 'mysql');
  define('DB_PREFIX', '');
  define('DB_SERVER', 'localhost');
  define('DB_SERVER_USERNAME', 'removed for this post');
  define('DB_SERVER_PASSWORD', 'removed for this post');
  define('DB_DATABASE', 'zencryst_CM11801');
  define('USE_PCONNECT', 'false');
  define('STORE_SESSIONS', 'db');
  // for STORE_SESSIONS, use 'db' for best support, or '' for file-based storage

  // The next 2 "defines" are for SQL cache support.
  // For SQL_CACHE_METHOD, you can select from:  none, database, or file
  // If you choose "file", then you need to set the DIR_FS_SQL_CACHE to a directory where your apache 
  // or webserver user has write privileges (chmod 666 or 777). We recommend using the "cache" folder inside the Zen Cart folder
  // ie: /path/to/your/webspace/public_html/zen/cache   -- leave no trailing slash  
  define('SQL_CACHE_METHOD', 'none'); 
  define('DIR_FS_SQL_CACHE', '/home/zencryst/public_html/craftmagick/cache');

// EOF

running zen version 1.3.8a
here's the website link http://www.craftmagick.com

21 Feb 2009, 1:50 AM
#2429
yellow1912 avatar

yellow1912

Totally Zenned

Join Date:
Oct 2006
Posts:
5,422
Plugin Contributions:
0

Re: Simple SEO URL (OLD version) [support thread]

I dont think version 3.5.8 has any bug that would cause this, but please upgrade right away to 3.6.3 first.
http://public.rubikintegration.com/

Clearing cache then please let me know if the error is still there.

21 Feb 2009, 4:43 AM
#2430
coolcarpartsonline avatar

coolcarpartsonline

Totally Zenned

Join Date:
Feb 2008
Posts:
1,386
Plugin Contributions:
0

Re: Simple SEO URL (OLD version) [support thread]

I am trying to install this mod on a site. I had first installed the 3.5.7 then I found out about the 3.6.3 so I tried to upgrade to the new version and now when I go to the extras>simple SEo I get the following error ```
1146 Table 'coolcarp_precutcartint.eztpl_links_aliases' doesn't exist
in:
[show index from eztpl_links_aliases]
If you were entering information, press the BACK button in your browser and re-check the information you had entered to be sure you left no blank fields.

Also the Add To Cart doesn't work with this mod.
21 Feb 2009, 4:45 AM
#2431
yellow1912 avatar

yellow1912

Totally Zenned

Join Date:
Oct 2006
Posts:
5,422
Plugin Contributions:
0

Re: Simple SEO URL (OLD version) [support thread]

oops, sorry the db file has some table prefix i forgot to remove.

The add to cart is because you are using an older version :)

PS: simply download the package again and upload the admin part.

21 Feb 2009, 5:07 AM
#2432
countrycharm avatar

countrycharm

Totally Zenned

Join Date:
Jul 2007
Posts:
2,179
Plugin Contributions:
2

Re: Simple SEO URL (OLD version) [support thread]

Yellow I was getting a error like this

1146 Table 'coolcarp_precutcartint.eztpl_links_aliases' doesn't exist
in:
[show index from eztpl_links_aliases]
If you were entering information, press the BACK button in your browser and re-check the information you had entered to be sure you left no blank fields.

You said

oops, sorry the db file has some table prefix i forgot to remove.

I downloaded a new package of ssu_beta_3.6.3 re=uploaded the admin and now I'm getting this

1091 Can't DROP 'link_url'; check that column/key exists
in:
[ALTER TABLE links_aliases DROP INDEX link_url;]
If you were entering information, press the BACK button in your browser and re-check the information you had entered to be sure you left no blank fields.

What am I missing. Thank you.

21 Feb 2009, 5:11 AM
#2433
yellow1912 avatar

yellow1912

Totally Zenned

Join Date:
Oct 2006
Posts:
5,422
Plugin Contributions:
0

Re: Simple SEO URL (OLD version) [support thread]

I think I should use alter ignore just to be safe i guess, since the db may be different, try to run this on your patch tool real quikck

ALTER TABLE links_aliases ADD UNIQUE (link_url);

Then go back and try the upgrade.

21 Feb 2009, 5:19 AM
#2434
countrycharm avatar

countrycharm

Totally Zenned

Join Date:
Jul 2007
Posts:
2,179
Plugin Contributions:
2

Re: Simple SEO URL (OLD version) [support thread]

Thanks for your help. After I went to admin/tools/install sql patches and installed the code you just gave me it say the same thing when I try to upgrade again.

1091 Can't DROP 'link_url'; check that column/key exists
in:
[ALTER TABLE links_aliases DROP INDEX link_url;]
If you were entering information, press the BACK button in your browser and re-check the information you had entered to be sure you left no blank fields.

21 Feb 2009, 5:22 AM
#2435
yellow1912 avatar

yellow1912

Totally Zenned

Join Date:
Oct 2006
Posts:
5,422
Plugin Contributions:
0

Re: Simple SEO URL (OLD version) [support thread]

Weird, okie what if you go to admin/includes/module_installation/yellow1912_ssu/db/14.sql

And remove the first line
ALTER TABLE links_aliases DROP INDEX link_url;

Thank you for letting me know about this btw, I have a feeling the alter command will not work for some reason.

countrycharm:

Thanks for your help. After I went to admin/tools/install sql patches and installed the code you just gave me it say the same thing when I try to upgrade again.

1091 Can't DROP 'link_url'; check that column/key exists
in:
[ALTER TABLE links_aliases DROP INDEX link_url;]
If you were entering information, press the BACK button in your browser and re-check the information you had entered to be sure you left no blank fields.

21 Feb 2009, 5:34 AM
#2436
countrycharm avatar

countrycharm

Totally Zenned

Join Date:
Jul 2007
Posts:
2,179
Plugin Contributions:
2

Re: Simple SEO URL (OLD version) [support thread]

After I removed
ALTER TABLE links_aliases DROP INDEX link_url;

I get this now

1091 Can't DROP 'link_alias'; check that column/key exists
in:
[ALTER TABLE links_aliases DROP INDEX link_alias;]
If you were entering information, press the BACK button in your browser and re-check the information you had entered to be sure you left no blank fields.

21 Feb 2009, 5:39 AM
#2437
yellow1912 avatar

yellow1912

Totally Zenned

Join Date:
Oct 2006
Posts:
5,422
Plugin Contributions:
0

Re: Simple SEO URL (OLD version) [support thread]

Well, 14.sql does this:
drop the 2 current unique key, then add a new pair of unique key. This will let the link alias functions properly. I have just tested on my own datbase and it works out without error, so it is strange why it doesnt run on your site.

I guess the fastest way to do it is: if you can access your phpmyadmin, you have to check table link alias, and make sure link_url and link_alias are not unique keys, after that you want to add this new unique key:

ALTER TABLE links_aliases ADD UNIQUE link_url ( link_url , link_alias );
If you run via phpmyadmin, make sure you add table prefix if needed.

After that, go to table module_version_tracker and manually set the ssu patch level to 14.

This database change will allow alias to functions properly, and after adding the new unique key pair then the site will work fine again.

21 Feb 2009, 5:48 AM
#2438
countrycharm avatar

countrycharm

Totally Zenned

Join Date:
Jul 2007
Posts:
2,179
Plugin Contributions:
2

Re: Simple SEO URL (OLD version) [support thread]

What do you mean by are not unique keys. Sorry it's getting late here...lol

21 Feb 2009, 5:51 AM
#2439
yellow1912 avatar

yellow1912

Totally Zenned

Join Date:
Oct 2006
Posts:
5,422
Plugin Contributions:
0

Re: Simple SEO URL (OLD version) [support thread]

countrycharm:

What do you mean by are not unique keys. Sorry it's getting late here...lol
When you view that table structure in phpmyadmin, under
Indexes:

"id" is the only index you should see (before you add the new key pair)

21 Feb 2009, 6:03 AM
#2440
countrycharm avatar

countrycharm

Totally Zenned

Join Date:
Jul 2007
Posts:
2,179
Plugin Contributions:
2

Re: Simple SEO URL (OLD version) [support thread]

Under links_aliases field there is
id
link_url
link_alias
status
alias_type
referring_id
permanent_link

They are not unique keys. Should I delete link_url and link_alias?