Zen Cart Logo
Forums / All Other Contributions/Addons / Ceon URI Mapping v4.x

Ceon URI Mapping v4.x

Views: 452,160

Results 1,181 to 1,200 of 2,454
24 May 2013, 11:17 AM
#1181
picandnix avatar

picandnix

Totally Zenned

Join Date:
Dec 2010
Location:
UK
Posts:
1,780
Plugin Contributions:
2

Ceon URI Mapping v4.x

Mike_Dean:

Hi,

I just updated from 3.6.3 to the 4.4.1 and checked through the installations pprocess and all went well and no (apparent) errors.

However I'm still getting the ?cpath=xxx tag at the end of numerous URL's

I read the FAQ and understand that this is apparent for linked products.
The issue is, I don't have any linked products on my site..??

I also understand they are not really an issue, but I'd rather them not be there unless they have to be, and as I don't have linked products, they don't have to be, or rather shouldn't be..!

I've gone through and re-generated various URL's to see if makes a difference but no...

I also cleared my own cache in case that was an issue but no
Any clues..?

Thanks,
Mike

can you post a link to a guilty product please?

24 May 2013, 3:34 PM
#1183
picandnix avatar

picandnix

Totally Zenned

Join Date:
Dec 2010
Location:
UK
Posts:
1,780
Plugin Contributions:
2

Re: Ceon URI Mapping v4.x

24 May 2013, 8:41 PM
#1184
mike_dean avatar

mike_dean

Totally Zenned

Join Date:
Feb 2006
Location:
Central Coast, NSW, Australia
Posts:
531
Plugin Contributions:
0

Re: Ceon URI Mapping v4.x

picandnix:

Are any of the items listed as specials or featured?

No.. they are standard listings

25 May 2013, 12:14 AM
#1185
14all41 avatar

14all41

New Zenner

Join Date:
Aug 2011
Location:
Indiana
Posts:
66
Plugin Contributions:
0

Re: Ceon URI Mapping v4.x

I have ZC 1.5 The mapping works great with the .htaccess file in place however my paypal express will not connect to paypal after adding this file. If I remove the .htaccess then the mapped pages give a 404 not found. I suspect the rule needs revising, but I have no clue what to change.
Here is the rule being used:

BEGIN CEON URI MAPPING REWRITE RULE

RewriteEngine On

Don't rewrite "cpanel" directory

RewriteCond %{REQUEST_URI} !^/cpanel/ [NC]

Don't rewrite any URIs ending with a file extension (ending with .[xxxxx])

RewriteCond %{REQUEST_URI} !.[a-zA-Z]{2,5}$ [OR]
RewriteCond %{REQUEST_URI} .(html|htm|php)$ [NC]

Don't rewrite any URIs for some, popular specific file format extensions,

which are not covered by main file extension condition above

RewriteCond %{REQUEST_URI} !.(mp3|mp4|h264)$ [NC]

Don't rewrite any URIs for some specific file format extensions,

which are not covered by main file extension condition above

Uncomment the following line to apply this condition! (Remove the # at the start of the next line)

#RewriteCond %{REQUEST_URI} !.(3gp|3g2|h261|h263|mj2|mjp2|mp4v|mpg4|m1v|m2v|m4u|f4v|m4v|3dml)$ [NC]

Don't rewrite admin directory

RewriteCond %{REQUEST_URI} !^/ad_ff_min [NC]

Don't rewrite editors directory

RewriteCond %{REQUEST_URI} !^/editors/ [NC]

Don't rewrite temp directory

RewriteCond %{REQUEST_URI} !^/temp/ [NC]

Don't rewrite old_editors directory

RewriteCond %{REQUEST_URI} !^/old_editors/ [NC]

Don't rewrite ffdocs directory

RewriteCond %{REQUEST_URI} !^/ffdocs/ [NC]

Handle all other URIs using Zen Cart (its index.php)

RewriteRule .* index.php [QSA,L]

END CEON URI MAPPING REWRITE RULE

25 May 2013, 12:27 AM
#1186
14all41 avatar

14all41

New Zenner

Join Date:
Aug 2011
Location:
Indiana
Posts:
66
Plugin Contributions:
0

Re: Ceon URI Mapping v4.x

I managed to figure it out.
I added this line to more inclusive of all the file types.
That is what caused the problem.
I went back to the original example of the file given by the module.
Works great thank you!
RewriteCond %{REQUEST_URI} .(html|htm|php)$ [NC]

25 May 2013, 12:37 AM
#1187
divavocals avatar

divavocals

Totally Zenned

Join Date:
Jan 2007
Location:
Los Angeles, California, United States
Posts:
10,011
Plugin Contributions:
3

Re: Ceon URI Mapping v4.x

14all41:

I managed to figure it out.
I added this line to more inclusive of all the file types.
That is what caused the problem.
I went back to the original example of the file given by the module.
Works great thank you!
RewriteCond %{REQUEST_URI} .(html|htm|php)$ [NC]
and the line is unnecessary which is why Conor didn't include it to begin with.. glad you got it all worked out..

27 May 2013, 10:55 PM
#1188
lisab avatar

lisab

New Zenner

Join Date:
May 2013
Location:
Brisbane, Queensland, Australia, Australia
Posts:
7
Plugin Contributions:
0

Re: Ceon URI Mapping v4.x

I apologise in advance if this is a silly question but i'm ripping my hair out and it's probably something very obvious! (Total Newb here)

I'm stuck on the Install Check.

The instructions/error reads:

Store Configuration Files Check
The value for DIR_WS_HTTPS_CATALOG in the store side's configure.php file is wrong.

The current value for DIR_WS_HTTPS_CATALOG is “https:/”.
The value for DIR_WS_HTTPS_CATALOG must start with a slash.
Add a slash, /, to the start of DIR_WS_HTTPS_CATALOG.
The value for DIR_WS_CATALOG does not match the value for DIR_WS_HTTPS_CATALOG in the store side's configure.php file.

The current value for DIR_WS_CATALOG is “/onlineshop/”.
The current value for DIR_WS_HTTPS_CATALOG is “https:/”.
As Ceon URI Mapping uses static URIs, it is not possible for the store to use different paths for the base of the store's URIs. For example, different subdirectories cannot be used.
This means a shared SSL certificate - for example, of the format http://shared-ssl-domain.com/store-username - cannot be used for the site once static URIs are being used.
You must change the value for DIR_WS_CATALOG to match that of DIR_WS_HTTPS_CATALOG.
To be able to make this change, and still have the site work correctly, may require purchasing and installing an SSL certificate for the store's domain.

I've downloaded the onlineshop/includes/configure.php and changed the details to:

define('DIR_WS_CATALOG', '/onlineshop/');
define('DIR_WS_HTTPS_CATALOG', '/onlineshop/');

So they're both the same and start with the /

Have tried to ftp and my ftp won't upload it saying Server Cannot Accept Argument. Not to be disuaded I've used the FTP with my site hosting and uploaded the file but . . .I'm still getting the same error on the Install Check.

Any suggestions as to what I've done wrong? :blush:

Site is http://ljandeb.com/onlineshop/

28 May 2013, 1:05 AM
#1189
lidlchris avatar

lidlchris

Zen Follower

Join Date:
Feb 2013
Posts:
345
Plugin Contributions:
0

Re: Ceon URI Mapping v4.x

this plugin has been working fine for months and still does.. my problem is this:

i discovered many old URL's (from old site) that are backlinked from other sites and tried adding 301 redirect statements to my htaccess file to redirect these to the new current pages.. i did this because there are still hundreds of urls' that i did not rename using CEON (i only did the main ones at install). Plus there are many other URL's from our blog (wordpress) that also needed to be redirected.

the redirects mostly all work BUT some don't and it's because the data in the 'to' URL is being copied to the end of the new URL..

for example http://www.swordsofhonor.com/theater-swords.html?pg=2html=theater-swords
is being redirected to http://www.swordsofhonor.com/fantasyswords.html?pg=2html=theater-swords when it should go to http://www.swordsofhonor.com/fantasyswords.html

here is the 301 redirect in the htaccess file
RedirectMatch 301 ^/theater-swords.* http://www.swordsofhonor.com/fantasyswords.html

is this fixable?? or do i have to go into hundreds of products and categories in the zen admin and add the old URL?? hope not.. :)

28 May 2013, 2:34 AM
#1190
lhungil avatar

lhungil

Totally Zenned

Join Date:
Feb 2012
Location:
mostly harmless
Posts:
1,818
Plugin Contributions:
4

Re: Ceon URI Mapping v4.x

lidlchris:

... do i have to go into hundreds of products and categories in the zen admin and add the old URL?? ..
This way would ensure CEON URI Mapping has knowledge of the old URI and reduce the chance of 301 redirect chaining. You can directly add these using phpMyAdmin or use the Zen Cart admin. You still have to go through hundreds of URLs no matter which way you use.

lidlchris:

... for example "http://www.swordsofhonor.com/theater-swords.html?pg=2html=theater-swords"
is being redirected to "http://www.swordsofhonor.com/fantasyswords.html?pg=2html=theater-swords" when it should go to "http://www.swordsofhonor.com/fantasyswords.html"

here is the 301 redirect in the htaccess file

RedirectMatch 301 ^/theater-swords.* http://www.swordsofhonor.com/fantasyswords.html

> 
> is this fixable??
This is not an issue with CEON URI Mapping.

If you want to remove the "Query String" you need to use [mod\_rewrite](http://httpd.apache.org/docs/current/mod/mod_rewrite.html) instead of using [mod\_alias](http://httpd.apache.org/docs/current/mod/mod_alias.html) to issue the redirect. Keep in mind if you change the location in the Zen Cart admin in the future you will end up with chained 301 redirects.

If you must use a 301 in the .htaccess file... Only use ONE of the following rules (based upon your needs).

#Place before other CEON URI Mapping Rules (METHOD 1)
#This matches based upon only the URI ignoring the Query String
RewriteRule ^/theater-swords.html$ /fantasy-swords.html [R=301,L]

#Place before other CEON URI Mapping Rules (METHOD 2)
#This matches based upon the URI and the Query String
RewriteCond %{QUERY_STRING} ^pg=2html=theater-swords$
RewriteRule ^/theater-swords.html$ /fantasy-swords.html [R=301,L]

28 May 2013, 2:54 AM
#1191
lidlchris avatar

lidlchris

Zen Follower

Join Date:
Feb 2013
Posts:
345
Plugin Contributions:
0

Re: Ceon URI Mapping v4.x

lhungil:

This way would ensure CEON URI Mapping has knowledge of the old URI and reduce the chance of 301 redirect chaining. You can directly add these using phpMyAdmin or use the Zen Cart admin. You still have to go through hundreds of URLs no matter which way you use.

turns out to be only about 25% of the redirects are for products/categories/pages that are on the current site - so 75% are for old pages, non-existant pages, and blog pages..

This is not an issue with CEON URI Mapping.
yes i think i stated that - it works great..

If you want to remove the "Query String" you need to use mod_rewrite instead of using mod_alias to issue the redirect. Keep in mind if you change the location in the Zen Cart admin in the future you will end up with chained 301 redirects.

If you must use a 301 in the .htaccess file... Only use ONE of the following rules (based upon your needs).

#Place before other CEON URI Mapping Rules (METHOD 1)
#This matches based upon only the URI ignoring the Query String
RewriteRule ^/theater-swords.html$ /fantasy-swords.html [R=301,L]

#Place before other CEON URI Mapping Rules (METHOD 2)
#This matches based upon the URI and the Query String
RewriteCond %{QUERY_STRING} ^pg=2html=theater-swords$
RewriteRule ^/theater-swords.html$ /fantasy-swords.html [R=301,L]


so with the 2nd method, i would have to know all of the query strings that i am trying to redirect for??   that option won't work..   and method one is the one i currently am using - somewhat - and that just carries the query string with it..    so then there is no other way to redirect to a static URL without carrying the query string - for the 75% of the urls i need to redirect??   unless, or course, i do a 1 for 1 redirect for all the URL's instead of trying to 'cheat' by lumping some together..
28 May 2013, 3:16 AM
#1192
lhungil avatar

lhungil

Totally Zenned

Join Date:
Feb 2012
Location:
mostly harmless
Posts:
1,818
Plugin Contributions:
4

Re: Ceon URI Mapping v4.x

lidlchris:

so with the 2nd method, i would have to know all of the query strings that i am trying to redirect for?? that option won't work. ...
Depends on what you need to match. Thus why both examples were given.

lidlchris:

... and method one is the one i currently am using - somewhat - and that just carries the query string with it.. so then there is no other way to redirect to a static URL without carrying the query string - for the 75% of the urls i need to redirect?? ...

Apache mod_alias (your example) by default keeps the Query String.

Apache mod_rewrite (posted solution) by default drops the Query String. In the event mod_rewrite on your hosting provider is not by default dropping the Query String you can explicitly tell mod_rewrite to drop the Query String. This is documented in the Apache mod_rewrite documentation for RewriteRule and for RewriteRule Flags.

28 May 2013, 4:22 AM
#1193
lidlchris avatar

lidlchris

Zen Follower

Join Date:
Feb 2013
Posts:
345
Plugin Contributions:
0

Re: Ceon URI Mapping v4.x

lhungil:

Depends on what you need to match. Thus why both examples were given.

Apache mod_alias (your example) by default keeps the Query String.

Apache mod_rewrite (posted solution) by default drops the Query String. In the event mod_rewrite on your hosting provider is not by default dropping the Query String you can explicitly tell mod_rewrite to drop the Query String. This is documented in the Apache mod_rewrite documentation for RewriteRule and for RewriteRule Flags.

i appreciate your help... still not getting anywhere and this is so d............m frustrating.. i went back to a simple 1 to 1 301 rewrite since i know all of the files that need to be rewritten and to where.. but NONE of it is working now.. i'm ready to blow up this computer.. here are a few examples NOT working:

RewriteRule ^/testimonials.html$ index.php?main_page=page_2 [R=301,L]
RewriteRule ^/umarex$ http://www.swordsofhonor.com/?main_page=index&manufacturers_id=50 [R=301]
RewriteRule ^/united-cutlery$ http://www.swordsofhonor.com/?main_page=index&manufacturers_id=49 [R=301]

i placed ALL of these rewrites above the CEON coding in htacess...

28 May 2013, 3:30 PM
#1194
lhungil avatar

lhungil

Totally Zenned

Join Date:
Feb 2012
Location:
mostly harmless
Posts:
1,818
Plugin Contributions:
4

Re: Ceon URI Mapping v4.x

A few things:

  • The new location should be an absolute path. So either starts with "http://" or with "/".
  • All RewriteRules with a flag of R should also use L to say "stop processing other rules and redirect now". So [R=301,L].
  • If for some reason the server is not dropping the Query String, use the flag QSD. So [R=301,QSD,L].
  • If one needs to keep the Query String, use the flag QSA. So [R=301,QSA,L].
  • On some servers the leading "/" is stripped from the "match" portion before being passed to mod_rewrite, so one may need to omit the leading "/" in the "match".

As lidlchris noted the best place for these "manual" 301 redirects will be after the "RewriteEngine On" and before the other stuff added by CEON URI Mapping.

RewriteRule ^umarex$ http://www.swordsofhonor.com/?main_page=index&manufacturers_id=50 [R=301,L]
28 May 2013, 6:39 PM
#1195
lidlchris avatar

lidlchris

Zen Follower

Join Date:
Feb 2013
Posts:
345
Plugin Contributions:
0

Re: Ceon URI Mapping v4.x

lhungil:

A few things:

  • The new location should be an absolute path. So either starts with "http://" or with "/".
  • All RewriteRules with a flag of R should also use L to say "stop processing other rules and redirect now". So [R=301,L].
  • If for some reason the server is not dropping the Query String, use the flag QSD. So [R=301,QSD,L].
  • If one needs to keep the Query String, use the flag QSA. So [R=301,QSA,L].
  • On some servers the leading "/" is stripped from the "match" portion before being passed to mod_rewrite, so one may need to omit the leading "/" in the "match".

As lidlchris noted the best place for these "manual" 301 redirects will be after the "RewriteEngine On" and before the other stuff added by CEON URI Mapping.

RewriteRule ^umarex$ http://www.swordsofhonor.com/?main_page=index&manufacturers_id=50 [R=301,L]


adding the ,L in the parameters [R=301,L] made them all work..   :D   BUT i still  can't get the ones with query strings to drop the strings..  when i use QSD, my entire website gives an 'internal server error' and no pages can be brought up..   i remove the QSD and all is fine..   i've tried QSD in different positions of the parameters [QSD,R=301,L], [R=301,L,QSD].
28 May 2013, 7:31 PM
#1196
lhungil avatar

lhungil

Totally Zenned

Join Date:
Feb 2012
Location:
mostly harmless
Posts:
1,818
Plugin Contributions:
4

Re: Ceon URI Mapping v4.x

lidlchris:

... i still can't get the ones with query strings to drop the strings..
Ahhh, your hosting provider is using Apache 2.2 (the QSD flag was added in Apache 2.4). Try the following to force Apache 2.2 to drop the Query String (it's a kludgy workaround - been awhile since I've used this):

RewriteRule ^theater-swords.html$ /fantasy-swords.html? [R=301,L]

Sorry I did not check your server version / remember this workaround earlier. Any of your RewriteRules which include a "?" such as the one for Umarex should already be dropping any extra query string components.

On a side note: If you ever use Google AdWords - make sure you change any ADs to use the new URLs as the old redirected URLs will discard the Google AdWords tracking code. Same goes for Campaign tracking via Google Analytics.

28 May 2013, 7:37 PM
#1197
lidlchris avatar

lidlchris

Zen Follower

Join Date:
Feb 2013
Posts:
345
Plugin Contributions:
0

Re: Ceon URI Mapping v4.x

lhungil:

Ahhh, your hosting provider is using Apache 2.2 (the QSD flag was added in Apache 2.4). Try the following to force Apache 2.2 to drop the Query String (it's a kludgy workaround - been awhile since I've used this):

RewriteRule ^theater-swords.html$ /fantasy-swords.html? [R=301,L]

> 
> Sorry I did not check your server version / remember this workaround earlier. Any of your RewriteRules which include a "?" such as the one for Umarex should already be dropping any extra query string components.
> 
> On a side note: If you ever use Google AdWords - make sure you change any ADs to use the new URLs as the old redirected URLs will discard the Google AdWords tracking code. Same goes for Campaign tracking via Google Analytics.

wow - worked great...   and thanks for the tip on adwords..    you've been a great help..   :smile:
28 May 2013, 7:42 PM
#1198
lhungil avatar

lhungil

Totally Zenned

Join Date:
Feb 2012
Location:
mostly harmless
Posts:
1,818
Plugin Contributions:
4

Re: Ceon URI Mapping v4.x

lidlchris:

wow - worked great...
Glad we were able to get things working as desired! And thank you for letting us know it worked :smile:

29 May 2013, 7:09 AM
#1199
lisab avatar

lisab

New Zenner

Join Date:
May 2013
Location:
Brisbane, Queensland, Australia, Australia
Posts:
7
Plugin Contributions:
0

Re: Ceon URI Mapping v4.x

Ok, I've solved the problem with the configure.php file. Am now up to rewriting. Where do I find the .htaccess file? :blush:

ETA - Please ignore. Apparently not enough caffeine today. :shocking: