Zen Cart Logo
Forums / General Questions / URL rewriting from Ceon to Utimate URL.

URL rewriting from Ceon to Utimate URL.

Views: 8,228

Results 1 to 20 of 41
5 Aug 2014, 7:17 AM
#1
robbie269 avatar

robbie269

Zen Follower

Join Date:
Feb 2010
Location:
New South Wales, Australia
Posts:
228
Plugin Contributions:
0

URL rewriting from Ceon to Utimate URL.

I have changed my URL rewriting from the CEON plugin to the Ultimate plugin when I upgraded to Zencart 1.5.3.
I can not get the URLs exactly the same as Ultimate URLs adds the category and product id to the end so I have setup a custom 404 page to catch anyone that uses the old CEON path.

My problem is that I am getting some soft 404 errors in Webmaster tools.

Eg: the URL http://www.thehorsestall.com.au/store/jewellery-boxes/treasure-music-box-carousel is going to a blank white screen. If you backspace to http://www.thehorsestall.com.au/store/jewellery-boxes it goes to the 404 page like I want.
Why is it doing this and what can I do about it?

5 Aug 2014, 12:24 PM
#2
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,100
Plugin Contributions:
56

Re: URL rewriting from Ceon to Utimate URL.

"blank white screen" implies that there's a debug-log file present in your /logs directory; that file will identify the PHP-related issue.

5 Aug 2014, 9:51 PM
#3
robbie269 avatar

robbie269

Zen Follower

Join Date:
Feb 2010
Location:
New South Wales, Australia
Posts:
228
Plugin Contributions:
0

Re: URL rewriting from Ceon to Utimate URL.

Hi lat9

No there is nothing in the logs directory. Is there some kind of character limit somewhere because if you backspace the url to http://www.thehorsestall.com.au/store/jewellery-boxes/treasure-music-box-ca the 404 page then appears?

6 Aug 2014, 12:42 AM
#4
robbie269 avatar

robbie269

Zen Follower

Join Date:
Feb 2010
Location:
New South Wales, Australia
Posts:
228
Plugin Contributions:
0

Re: URL rewriting from Ceon to Utimate URL.

After a bit of experimenting I have found that this part of the .htaccess that is added by Ultimate URLS is causing the problem:

# All other pages
# Don't rewrite real files or directories
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index\.php?main_page=$1&%{QUERY_STRING} [L]

With it in the .htaccess file it seems to go to the Zen Cart 404 page for deleted shorter product URLS but for deleted longer ones it just gives the white screen??
When I take it out all product URLs that are wrong go to the 404 page I created in Cpanel.
Any ideas about why the above bit of code does what it does?

6 Aug 2014, 12:55 AM
#5
robbie269 avatar

robbie269

Zen Follower

Join Date:
Feb 2010
Location:
New South Wales, Australia
Posts:
228
Plugin Contributions:
0

Re: URL rewriting from Ceon to Utimate URL.

With the code mentioned in the previous post still removed I have now added the following to .htaccess file:

# Handle when a resource is not found (404 Error Page)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index\.php?main_page=page_not_found&%{QUERY_STRING} [L]

And all missing URLs, no matter how long they are, go to the Zen Cart 404 page.:smile:

6 Aug 2014, 1:53 AM
#6
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: URL rewriting from Ceon to Utimate URL.

I don't wish to start anything. Knowing that the CEON software hasn't been fully updated for ZC 1.5.3 by including the folder with the same name in the installation package based on posts in the same forum, I was curious about why the change?

6 Aug 2014, 2:12 AM
#7
robbie269 avatar

robbie269

Zen Follower

Join Date:
Feb 2010
Location:
New South Wales, Australia
Posts:
228
Plugin Contributions:
0

Re: URL rewriting from Ceon to Utimate URL.

mc12345678:

I don't wish to start anything. Knowing that the CEON software hasn't been fully updated for ZC 1.5.3 by including the folder with the same name in the installation package based on posts in the same forum, I was curious about why the change?

When I upgraded to 1.5.3 I had a problem with using the PayPal Express option. It gave the error "CancelURL is invalid". I narrowed the issue down to the CEON module. I went live without any URL remapping. Tried the Ultimate URLs on my test site and did not get the Paypal error. So I put it on my live site.

6 Aug 2014, 2:19 AM
#8
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: URL rewriting from Ceon to Utimate URL.

robbie269:

When I upgraded to 1.5.3 I had a problem with using the PayPal Express option. It gave the error "CancelURL is invalid". I narrowed the issue down to the CEON module. I went live without any URL remapping. Tried the Ultimate URLs on my test site and did not get the Paypal error. So I put it on my live site.

You didn't happen to have the rewritecond that is listed in the instructions as something like .htm|.html|.php did you? In the .htaccess file? If so, that is a known issue to include and is documented in the forum to not work with paypal express...

Regardless I'm working on something with the rewriter on a 1.5.3 site and will be sure to test that aspect now that the comment has been made. Thank you for pointing that issue out, will see if it is reproducible when using the suggested .htaccess file made by the software.

6 Aug 2014, 2:25 AM
#9
robbie269 avatar

robbie269

Zen Follower

Join Date:
Feb 2010
Location:
New South Wales, Australia
Posts:
228
Plugin Contributions:
0

Re: URL rewriting from Ceon to Utimate URL.

mc12345678:

You didn't happen to have the rewritecond that is listed in the instructions as something like .htm|.html|.php did you? In the .htaccess file? If so, that is a known issue to include and is documented in the forum to not work with paypal express...
I still have a copy of the original .htaccess file and there is no mention of .htm|etc. The CEON module worked fine for me on version 1.5.1.

6 Aug 2014, 2:53 AM
#10
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: URL rewriting from Ceon to Utimate URL.

robbie269:

I still have a copy of the original .htaccess file and there is no mention of .htm|etc. The CEON module worked fine for me on version 1.5.1.

Thank you for checking. Another question, when the new store was tested, was it located in the same location as the old store? Ie, did the return address in paypal set to go back to the 1.5.3 site or the previous version's location? (I don't recall the comparison results, but I thought there were some changes to files associated with paypal and I don't know if that means/meant ipnhandler as well... (I'm about done installing paypal credentials to test, this issue.)

6 Aug 2014, 3:08 AM
#11
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: URL rewriting from Ceon to Utimate URL.

mc12345678:

Thank you for checking. Another question, when the new store was tested, was it located in the same location as the old store? Ie, did the return address in paypal set to go back to the 1.5.3 site or the previous version's location? (I don't recall the comparison results, but I thought there were some changes to files associated with paypal and I don't know if that means/meant ipnhandler as well... (I'm about done installing paypal credentials to test, this issue.)

So, I have products mapped, but not say the other uris such as main_page=shopping_cart, but I went to and cancelled a purchase and was successfully brought back to the cart. Will try to provide payment information and come back to the cart.

6 Aug 2014, 3:13 AM
#12
lhungil avatar

lhungil

Totally Zenned

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

Re: URL rewriting from Ceon to Utimate URL.

robbie269:

After a bit of experimenting I have found that this part of the .htaccess that is added by Ultimate URLS is causing the problem:

All other pages

Don't rewrite real files or directories

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?main_page=$1&%{QUERY_STRING} [L]

> With it in the .htaccess file it seems to go to the Zen Cart 404 page for deleted shorter product URLS but for deleted longer ones it just gives the white screen??
> When I take it out all product URLs that are wrong go to the 404 page I created in Cpanel.
> Any ideas about why the above bit of code does what it does?
That little bit of code in the .htaccess from Ultimate URLs is what handles non product / category / EZ pages. Removal will break handing of pages such as privacy, shipping_info, etc if rewritting is enabled for those pages. Not a big deal if you disable rewriting of all the other pages... But in and of itself that rule will not be the root cause of a "blank page".

You may want to enable "autoload" debugging in Zen Cart to see if an error is occuring during autoload or modify your php.ini to log all PHP errors to file (will catch all PHP errors including before Zen Cart's file logging is loaded / enabled).

As for CEON URI, that error is a new one to me... Although I've not used any versions past 4.4.0 (2012)... Has the paypal cancel URI changed? Or is a different one specified somewhere in settings on paypal?

Also on a side note, if your site was well established w/ good ranking on SEs... After changing the URLs you will probably want to redirect (or rewrite) the old URLs to the new ones...
6 Aug 2014, 3:35 AM
#13
robbie269 avatar

robbie269

Zen Follower

Join Date:
Feb 2010
Location:
New South Wales, Australia
Posts:
228
Plugin Contributions:
0

Re: URL rewriting from Ceon to Utimate URL.

mc12345678:

Ie, did the return address in paypal set to go back to the 1.5.3 site or the previous version's location?
As I recall it would not even go to Paypal. I just got an error message.
My test site worked OK with Paypal Express at first, but I eventually worked out that was because I did not have Ceon activated on the test site. As it is under the same domain as my live site. ie /store/ vs /store_test/.
When I moved the 1.5.3 version to my live site, with Ceon activated, that is when the Paypal problem started. I quickly went back to my 1.5.1 copy for the live site, as at the time I did not really know what was causing the error.
After a bit of trial and error, and hair pulling, I eventually activated Ceon on the test site and got the same paypal error as what the live site did previously.

6 Aug 2014, 3:46 AM
#14
robbie269 avatar

robbie269

Zen Follower

Join Date:
Feb 2010
Location:
New South Wales, Australia
Posts:
228
Plugin Contributions:
0

Re: URL rewriting from Ceon to Utimate URL.

lhungil:

That little bit of code in the .htaccess from Ultimate URLs is what handles non product / category / EZ pages. Removal will break handing of pages such as privacy, shipping_info, etc if rewritting is enabled for those pages. Not a big deal if you disable rewriting of all the other pages... But in and of itself that rule will not be the root cause of a "blank page".
I am only using the rewritting for my product pages so at least I know I did not do any major problems deleting it.

lhungil:

You may want to enable "autoload" debugging in Zen Cart to see if an error is occuring during autoload or modify your php.ini to log all PHP errors to file (will catch all PHP errors including before Zen Cart's file logging is loaded / enabled).
Will have to look up how to do this.

lhungil:

As for CEON URI, that error is a new one to me... Although I've not used any versions past 4.4.0 (2012)... Has the paypal cancel URI changed? Or is a different one specified somewhere in settings on paypal?
Nothing had been changed in Paypal.

lhungil:

Also on a side note, if your site was well established w/ good ranking on SEs... After changing the URLs you will probably want to redirect (or rewrite) the old URLs to the new ones...
Probably.... Is there an easy way to do it with a couple of hundred products?

6 Aug 2014, 3:55 AM
#15
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: URL rewriting from Ceon to Utimate URL.

robbie269:

As I recall it would not even go to Paypal. I just got an error message.
My test site worked OK with Paypal Express at first, but I eventually worked out that was because I did not have Ceon activated on the test site. As it is under the same domain as my live site. ie /store/ vs /store_test/.
When I moved the 1.5.3 version to my live site, with Ceon activated, that is when the Paypal problem started. I quickly went back to my 1.5.1 copy for the live site, as at the time I did not really know what was causing the error.
After a bit of trial and error, and hair pulling, I eventually activated Ceon on the test site and got the same paypal error as what the live site did previously.

But, with the 1.5.3 site, ceon installed but deactivated, you were able to get to paypal, correct? Having just activated the paypal credentials I was going to try, I'm wondering if I need to wait a few "minutes" or if there is something similar going on. (Or of course I could have setup paypal express incorrectly, which at the moment, I'm thinking ny of these issues could be true.) :)

6 Aug 2014, 3:57 AM
#16
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: URL rewriting from Ceon to Utimate URL.

robbie269:

I am only using the rewritting for my product pages so at least I know I did not do any major problems deleting it.

Will have to look up how to do this.

Nothing had been changed in Paypal.

Probably.... Is there an easy way to do it with a couple of hundred products?

I have some ideas, but what you consider easy and what I consider easy may be two different things. :) I have a relatively high tolerance before something becomes not easy. :)

6 Aug 2014, 4:07 AM
#17
robbie269 avatar

robbie269

Zen Follower

Join Date:
Feb 2010
Location:
New South Wales, Australia
Posts:
228
Plugin Contributions:
0

Re: URL rewriting from Ceon to Utimate URL.

mc12345678:

But, with the 1.5.3 site, ceon installed but deactivated, you were able to get to paypal, correct?
Yes that is correct.

6 Aug 2014, 4:14 AM
#18
robbie269 avatar

robbie269

Zen Follower

Join Date:
Feb 2010
Location:
New South Wales, Australia
Posts:
228
Plugin Contributions:
0

Re: URL rewriting from Ceon to Utimate URL.

lhungil:

You may want to enable "autoload" debugging in Zen Cart to see if an error is occuring during autoload or modify your php.ini to log all PHP errors to file (will catch all PHP errors including before Zen Cart's file logging is loaded / enabled).
Ok got STRICT_ERROR_REPORTING going on my test site. I will see what it does.

6 Aug 2014, 4:24 AM
#19
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: URL rewriting from Ceon to Utimate URL.

mc12345678:

But, with the 1.5.3 site, ceon installed but deactivated, you were able to get to paypal, correct? Having just activated the paypal credentials I was going to try, I'm wondering if I need to wait a few "minutes" or if there is something similar going on. (Or of course I could have setup paypal express incorrectly, which at the moment, I'm thinking ny of these issues could be true.) :)

Went to another device, tried both with on and off, and able to reach paypal for payment on that device. Entered credit card information and was returned back to the site without issue.

Therefore unable to reproduce this issue, though unlike lhungil I have a more recent version installed. :) I am running php 5.3 on zc 1.5.3, so don't know if that also has an effect or is a cause of this difference.

6 Aug 2014, 4:36 AM
#20
robbie269 avatar

robbie269

Zen Follower

Join Date:
Feb 2010
Location:
New South Wales, Australia
Posts:
228
Plugin Contributions:
0

Re: URL rewriting from Ceon to Utimate URL.

robbie269:

Ok got STRICT_ERROR_REPORTING going on my test site. I will see what it does.

Could not get it to do the error on the test site. Maybe it is something with my main .htaccess file??

Anyway I had a little play on the live site and this worked:

# Handle when a resource is not found (404 Error Page)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index\.php?main_page=page_not_found&%{QUERY_STRING} [L]

# All other pages
# Don't rewrite real files or directories
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index\.php?main_page=$1&%{QUERY_STRING} [L]

As long as I have the "error" part before the "other pages" part it is all good.