Jump to content
Latest News: (loading..)
FWR Media

ULTIMATE Seo Urls 5 - by FWR Media

Recommended Posts

I had the same problem as Robert. I was able to fix "The No Product Found" error by changing the following line in:

catalog/includes/modules/product_listing.php and catalog/includes/modules/new_products.php

 

Original Line in each file:

 

$p_details = '<a href="' . tep_href_link('product_info.php?products_id='.$p_id) . '">'.tep_image_button('button_details.gif', '', ' class="btn1"').'</a>';

 

Fixed Line in each file:

 

$p_details = '<a href="'.tep_href_link("product_info.php","products_id=".$p_id).'">'.tep_image_button('button_details.gif', '', ' class="btn1"').'</a>';

 

This worked for me. I hope it works for you. Great Contribution.

 

Thanks

 

Thanks for posting this Erik your correction of the faulty code is perfect .. tep_href_link('product_info.php?products_id='.$p_id) is bad code and would never work ..

Share this post


Link to post
Share on other sites

Hi Rob,

 

I have a problem I cant seem to figure out.....

 

I have upgraded from 2.1 to 5 and everything seemed to have gone well, however...

 

We offer custom built computers and use attribute sets to offer all the different options....

 

When a customer configures a system and adds it to cart everything seems fine.... if you click the link in the shopping cart for the product it takes you back to the product info page with the following in the address bar:

 

http://www.ginger6.com/product_info.php?products_id=34163{3}413{33}527{5}571{34}535{26}556{25}278{1}386{20}477{28}478{35}592{6}16{7}479{8}480{10}481{12}482{14}486{16}596{17}494{18}488{30}445{4}490{31}455{15}346'>http://www.ginger6.com/product_info.php?products_id=34163{3}413{33}527{5}571{34}535{26}556{25}278{1}386{20}477{28}478{35}592{6}16{7}479{8}480{10}481{12}482{14}486{16}596{17}494{18}488{30}445{4}490{31}455{15}346

 

now if you try to add that product to the cart again, or click on the 'reviews' button you get a page not found message...the url taht the add to cart button is generating is:

 

http://www.ginger6.com/fusion-5750i-core-gaming-computer-p-34163%7B3%7D413%7B33%7D527%7B5%7D571%7B34%7D535%7B26%7D556%7B25%7D278%7B1%7D386%7B20%7D477%7B28%7D478%7B35%7D592%7B6%7D16%7B7%7D479%7B8%7D480%7B10%7D481%7B12%7D482%7B14%7D486%7B16%7D596%7B17%7D494%7B18%7D488%7B30%7D445%7B4%7D490%7B31%7D455%7B15%7D346.html?action=add_product'>http://www.ginger6.com/fusion-5750i-core-gaming-computer-p-34163%7B3%7D413%7B33%7D527%7B5%7D571%7B34%7D535%7B26%7D556%7B25%7D278%7B1%7D386%7B20%7D477%7B28%7D478%7B35%7D592%7B6%7D16%7B7%7D479%7B8%7D480%7B10%7D481%7B12%7D482%7B14%7D486%7B16%7D596%7B17%7D494%7B18%7D488%7B30%7D445%7B4%7D490%7B31%7D455%7B15%7D346.html?action=add_product

 

and the reviews button is producing the following url...

 

http://www.ginger6.com/fusion-5750i-core-gaming-computer-pr-34163%7B3%7D413%7B33%7D527%7B5%7D571%7B34%7D535%7B26%7D556%7B25%7D278%7B1%7D386%7B20%7D477%7B28%7D478%7B35%7D592%7B6%7D16%7B7%7D479%7B8%7D480%7B10%7D481%7B12%7D482%7B14%7D486%7B16%7D596%7B17%7D494%7B18%7D488%7B30%7D445%7B4%7D490%7B31%7D455%7B15%7D346.html'>http://www.ginger6.com/fusion-5750i-core-gaming-computer-pr-34163%7B3%7D413%7B33%7D527%7B5%7D571%7B34%7D535%7B26%7D556%7B25%7D278%7B1%7D386%7B20%7D477%7B28%7D478%7B35%7D592%7B6%7D16%7B7%7D479%7B8%7D480%7B10%7D481%7B12%7D482%7B14%7D486%7B16%7D596%7B17%7D494%7B18%7D488%7B30%7D445%7B4%7D490%7B31%7D455%7B15%7D346.html

 

everything works fine when you go into a product the first time, it only has a problem if you click on the product link in the shopping cart and try to add another to the cart, whether you change the options or not makes no difference to the end result...

 

Any ideas where it is going wrong?

 

Kevin Wilson

Ginger6 Ltd

http://www.ginger6.com

Share this post


Link to post
Share on other sites

Hi,

 

I just install this contrib... Work fine in standard mode, but I would like to use the rewrite mode.

 

I follow all step in zip file, but I receive 404 error. Don't know why...

 

Here is my htaccess file :

 

SetEnv PHP_VER 5

 

Options +FollowSymLinks

RewriteEngine On

 

RewriteBase /

RewriteCond %{HTTP_HOST} !^www\.domain\.com$ [NC]

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

 

Thank you !

Edited by Vincent Detune

Share this post


Link to post
Share on other sites

Hi,

 

I just install this contrib... Work fine in standard mode, but I would like to use the rewrite mode.

 

I follow all step in zip file, but I receive 404 error. Don't know why...

 

Here is my htaccess file :

 

SetEnv PHP_VER 5

 

Options +FollowSymLinks

RewriteEngine On

 

RewriteBase /

RewriteCond %{HTTP_HOST} !^www\.domain\.com$ [NC]

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

 

Thank you !

 

That .htaccess file does not contain the entries given in the instructions.

Share this post


Link to post
Share on other sites
parksey, on 11 February 2010 - 07:22 PM, said:

Great,

Any idea why I can't get version 5 working on IIS then with rewrite installed?

 

All the URL's look fine and are the same as version 2 urls? so it's got me stumped?

 

Cheers

 

This suggests that your includes/configure.php is incorrect.

 

You mentioned an error where includes/configure.php cannot be found, you may also want to try the includes/local/ directory to see if there's a configure file in there.

 

As for your redirect, you mentioned the 301 as ..

 

http://www.devsite.com/floor-scales-c-27.html 

 

But was was the intended link location?

Share this post


Link to post
Share on other sites

great contribution and really appreciate the work!

 

Something that puzzles me tough is

a ) after checkout & payment with an order, I get the 404 USU page. the URL of the page I get is : index.php?&action=notify&notify[]=&osCsid=. Looks like he is hanging on the notify[] values?

B ) I made a little modification to the store which passes a GET parameter to the index.php page. USU doesn't like that and throws a 404 error. Any idea how I can solve this in a way that my custom code would still be executed? Or eventually how can I catch this within USU and perform the custom code there?

Edited by Roeben

Share this post


Link to post
Share on other sites

This suggests that your includes/configure.php is incorrect.

 

You mentioned an error where includes/configure.php cannot be found, you may also want to try the includes/local/ directory to see if there's a configure file in there.

 

As for your redirect, you mentioned the 301 as ..

 

http://www.devsite.com/floor-scales-c-27.html 

 

But was was the intended link location?

 

Yes the URL is correct, if I switch the WWW.DEVSITE.COM for the domain with version 2 running I get the correct page.

The includes /local does not have configure.php in it and the site runs fine, the link to the test site is www.dev.brash-scales.com if you would like to take a look ?

 

It throws no errors in PHP and having KISS installed does not get me any closer, great contrib mind as it shows up some contribs to be really buggy.

 

Again help is greatly appreciated.

Edited by parksey

Share this post


Link to post
Share on other sites

Hi giuys im new to the forum and hoping to get i little help, i have just installed this mod and am having the PNF issue, can anybody let me know a way to fix this.

 

www.outdoor-ideas.co.uk

 

Many thanks.

 

Ivan.

Share this post


Link to post
Share on other sites

Hi giuys im new to the forum and hoping to get i little help, i have just installed this mod and am having the PNF issue, can anybody let me know a way to fix this.

 

www.outdoor-ideas.co.uk

 

Many thanks.

 

Ivan.

 

Switch on debugging and post the URL's on here. DO you have a test site we can look at with this issue.

Are you getting any errors in your php error log?

 

 

Be sure you have placed the rewrite rules in the .htaaccess file ??

And what server is it running on? Apache IIS ?

Edited by parksey

Share this post


Link to post
Share on other sites

Yes the URL is correct, if I switch the WWW.DEVSITE.COM for the domain with version 2 running I get the correct page.

The includes /local does not have configure.php in it and the site runs fine, the link to the test site is www.dev.brash-scales.com if you would like to take a look ?

 

It throws no errors in PHP and having KISS installed does not get me any closer, great contrib mind as it shows up some contribs to be really buggy.

 

Again help is greatly appreciated.

 

includes/modules/ultimate_seo_urls5/classes/Usu_Validator.php

 

Find ..

 

      // we have a valid seo url return but the new seo url does not match the request .. so 301 redirect                                                                        
     if ( false === ( urldecode( $this->filestring ) == $compare ) ) {
       $this->redirect( $newlink );
     }

 

change temporarily to ..

 

      // REMOVE ME
     if ( array_key_exists( 'fwrtest', $_GET ) ) {
       exit( 'Incoming uri:<br />' . urldecode( $this->filestring ) . '<br />New uri to compare:<br />' . $compare );
     }
     // REMOVE ME  
     // we have a valid seo url return but the new seo url does not match the request .. so 301 redirect                                                                        
     if ( false === ( urldecode( $this->filestring ) == $compare ) ) {
       $this->redirect( $newlink );
     }

 

Then access an seo url appending ?fwrtest and print the outcome here please.

Share this post


Link to post
Share on other sites

Hi giuys im new to the forum and hoping to get i little help, i have just installed this mod and am having the PNF issue, can anybody let me know a way to fix this.

 

www.outdoor-ideas.co.uk

 

Many thanks.

 

Ivan.

 

You have some dodgy code on the site redirecting (but not a propper 301 header) to index.php

 

There is a post earlier about some template with a javascript header redirect.

Share this post


Link to post
Share on other sites

Incoming uri:

index.php

New uri to compare:

bench-scales-c-21.html

FWR MEDIA

ULTIMATE Seo Urls 5 - Performance

Standard URI produced: 0

SEO URI produced: 2

Query Count: 0

Queries Saved: 2

Cache load time: 0.0025 seconds

Cache File Size: 2.15 kb

Standard Urls:

Seo Urls:

http://www.dev.brash-scales.com/index.php

http://www.dev.brash-scales.com/bench-scales-c-21.html

Queries:

 

Any use?

Share this post


Link to post
Share on other sites

Incoming uri:

index.php

New uri to compare:

bench-scales-c-21.html

FWR MEDIA

ULTIMATE Seo Urls 5 - Performance

Standard URI produced: 0

SEO URI produced: 2

Query Count: 0

Queries Saved: 2

Cache load time: 0.0025 seconds

Cache File Size: 2.15 kb

Standard Urls:

Seo Urls:

http://www.dev.brash-scales.com/index.php

http://www.dev.brash-scales.com/bench-scales-c-21.html

Queries:

 

Any use?

 

Yes that helps greatly and is very odd.

 

And the output from the following? ..

 

      // REMOVE ME
     if ( array_key_exists( 'fwrtest', $_GET ) ) {
       exit( 'Incoming uri:<br />' . urldecode( $this->filestring ) . '<br />
              New uri to compare:<br />' . $compare . '<br />
              REQUEST_URI = ' .         ( isset( $_SERVER['REQUEST_URI'] ) ? $_SERVER['REQUEST_URI'] : 'inexistant' ) . '<br />
              HTTP_X_ORIGINAL_URL = ' . ( isset( $_SERVER['HTTP_X_ORIGINAL_URL'] ) ? $_SERVER['HTTP_X_ORIGINAL_URL']  : 'inexistant' ) . '<br />
              HTTP_X_REWRITE_URL =  ' . ( isset( $_SERVER['HTTP_X_REWRITE_URL'] ) ? $_SERVER['HTTP_X_REWRITE_URL'] : 'inexistant' ) . '<br />' );
     }
     // REMOVE ME  
     // we have a valid seo url return but the new seo url does not match the request .. so 301 redirect                                                                        
     if ( false === ( urldecode( $this->filestring ) == $compare ) ) {
       $this->redirect( $newlink );
     }

Share this post


Link to post
Share on other sites

Incoming uri:

index.php

New uri to compare:

bench-scales-c-21.html

REQUEST_URI = /index.php?cPath=21&fwrtest

HTTP_X_ORIGINAL_URL = inexistant

HTTP_X_REWRITE_URL = /bench-scales-c-21.html?fwrtest

 

I assume you only want this part, i'm intrigued

Share this post


Link to post
Share on other sites

Incoming uri:

index.php

New uri to compare:

bench-scales-c-21.html

REQUEST_URI = /index.php?cPath=21&fwrtest

HTTP_X_ORIGINAL_URL = inexistant

HTTP_X_REWRITE_URL = /bench-scales-c-21.html?fwrtest

 

I assume you only want this part, i'm intrigued

 

Well that looks to me to be a very nasty implementation of REQUEST_URI on a Windows server.

 

HTTP_X_REWRITE_URL is reporting correctly the uri string and the whole point of Windows (or addon) implementing a patch to replicate the *nix REQUEST_URI "should" mean that it reports the same as HTTP_X_REWRITE_URL .. on your server it doesn't.

 

USU5 checks first for REQUEST_URI and if in existance uses it .. if not it goes through "Windows processes" yours is failing as REQUEST_URI is present but is containing information from the rewrite and not the initial request.

Share this post


Link to post
Share on other sites

Same file as we mentioned previously .. the following would probably work on your server.

   private function iis_request_uri() {
     $rawpath = '';
     switch ( true ) {
       case array_key_exists( 'HTTP_X_ORIGINAL_URL', $_SERVER ):
         $rawpath = str_replace( '\\', '/', $_SERVER['HTTP_X_ORIGINAL_URL'] );
         break;
       case array_key_exists( 'HTTP_X_REWRITE_URL', $_SERVER ):
         $rawpath = str_replace( '\\', '/', $_SERVER['HTTP_X_REWRITE_URL'] );
         break;
       case array_key_exists( 'REQUEST_URI', $_SERVER ):
         $rawpath = str_replace( '\\', '/', $_SERVER['REQUEST_URI'] );
         break;
       case array_key_exists( 'ORIG_PATH_INFO', $_SERVER ):
         $rawpath = str_replace( '\\', '/', $_SERVER['ORIG_PATH_INFO'] );
         break;
       default:
         trigger_error( 'USU5 cannot recreate REQUEST_URI for your windows server, please inform the developer.', E_USER_WARNING );
         break;
     }
     // Remove the directory path from the URI
     if ( DIR_WS_CATALOG != '/' ) {
       $rawpath = str_replace( DIR_WS_CATALOG, '', $rawpath );
     }
     $this->request_uri = trim( $rawpath, '/' ); 
   } // end method

Share this post


Link to post
Share on other sites

Thanks for that, I had been looking at this for days.

 

I was not aware of any problems with REQUEST_URI on IIS 6 I know there is a bug in IIS 7 that causes problems with REQUEST_URI

 

However saying that $_SERVER['REQUEST_URI'] is always a pain on windows servers

 

here is a workaround if using the helicon rewrite

 

<?php
   /*
   * REQUEST_URI for IIS Servers
   * Version: 1.1
   * Guaranteed to provide Apache-compliant $_SERVER['REQUEST_URI'] variables
   * Please see full documentation at 

   * Copyright NeoSmart Technologies 2006-2008
   * Code is released under the LGPL and maybe used for all private and public code

   * Instructions: http://neosmart.net/blog/2006/100-apache-compliant-request_uri-for-iis-and-windows/
   * Support: http://neosmart.net/forums/forumdisplay.php?f=17
   * Product URI: http://neosmart.net/dl.php?id=7
   */

   //This file should be located in the same directory as php.exe or php5isapi.dll

   //ISAPI_Rewrite 3.x
   if (isset($_SERVER['HTTP_X_REWRITE_URL'])){
       $_SERVER['REQUEST_URI'] = $_SERVER['HTTP_X_REWRITE_URL'];
   }
   //ISAPI_Rewrite 2.x w/ HTTPD.INI configuration
   else if (isset($_SERVER['HTTP_REQUEST_URI'])){
       $_SERVER['REQUEST_URI'] = $_SERVER['HTTP_REQUEST_URI'];
       //Good to go!
   }
   //ISAPI_Rewrite isn't installed or not configured
   else{
       //Someone didn't follow the instructions!
       if(isset($_SERVER['SCRIPT_NAME']))
           $_SERVER['HTTP_REQUEST_URI'] = $_SERVER['SCRIPT_NAME'];
       else
           $_SERVER['HTTP_REQUEST_URI'] = $_SERVER['PHP_SELF'];
       if($_SERVER['QUERY_STRING']){
           $_SERVER['HTTP_REQUEST_URI'] .=  '?' . $_SERVER['QUERY_STRING'];
       }
       //WARNING: This is a workaround!
       //For guaranteed compatibility, HTTP_REQUEST_URI or HTTP_X_REWRITE_URL *MUST* be defined!
       //See product documentation for instructions!
       $_SERVER['REQUEST_URI'] = $_SERVER['HTTP_REQUEST_URI'];
   }

?>

 

Not mine but free and you could add it to the includes if anybody else has this problem.

 

I added it to PHP.ini and went back to the original code.

 

Thanks for all the help, I was pulling my hair out.

Share this post


Link to post
Share on other sites

Thanks for all the help, I was pulling my hair out.

 

My pleasure and thanks for adding your own support for users in this thread.

Share this post


Link to post
Share on other sites

Hi Rob,

 

I have a problem I cant seem to figure out.....

 

I have upgraded from 2.1 to 5 and everything seemed to have gone well, however...

 

We offer custom built computers and use attribute sets to offer all the different options....

 

When a customer configures a system and adds it to cart everything seems fine.... if you click the link in the shopping cart for the product it takes you back to the product info page with the following in the address bar:

 

http://www.ginger6.c...0{31}455{15}346

 

now if you try to add that product to the cart again, or click on the 'reviews' button you get a page not found message...the url taht the add to cart button is generating is:

 

http://www.ginger6.c...ion=add_product

 

and the reviews button is producing the following url...

 

http://www.ginger6.c...7B15%7D346.html

 

everything works fine when you go into a product the first time, it only has a problem if you click on the product link in the shopping cart and try to add another to the cart, whether you change the options or not makes no difference to the end result...

 

Any ideas where it is going wrong?

 

Kevin Wilson

Ginger6 Ltd

http://www.ginger6.com

Share this post


Link to post
Share on other sites

I installed this mod yesterday. I have looked through this thread with search and can't find my particular problem. Any ideas? When turned off, everything works fine. When set to true/rewrite I get a 404 (not the custom one) When set to standard I get this:

 

Warning: Cannot modify header information - headers already sent by (output started at /home/xxxx/public_html/shop/includes/filenames.php:63) in /home/xxxx/public_html/shop/includes/modules/ultimate_seo_urls5/classes/Usu_Validator.php on line 227

 

Warning: Cannot modify header information - headers already sent by (output started at /home/xxxx/public_html/shop/includes/filenames.php:63) in /home/xxxx/public_html/shop/includes/modules/ultimate_seo_urls5/classes/Usu_Validator.php on line 228

 

configure.php

 

define('HTTP_SERVER', 'http://ipaddress/~xxxx');

define('HTTPS_SERVER', 'https://ipaddress/~xxxx');

define('ENABLE_SSL', true);

define('HTTP_COOKIE_DOMAIN', 'ipaddress/~xxxx');

define('HTTPS_COOKIE_DOMAIN', 'ipaddress/~xxxx');

define('HTTP_COOKIE_PATH', '/shop/');

define('HTTPS_COOKIE_PATH', '/shop/');

define('DIR_WS_HTTP_CATALOG', '/shop/');

define('DIR_WS_HTTPS_CATALOG', '/shop/');

define('DIR_FS_CATALOG', '/home/xxxx/public_html/shop/');

Share this post


Link to post
Share on other sites

I installed this mod yesterday. I have looked through this thread with search and can't find my particular problem. Any ideas? When turned off, everything works fine. When set to true/rewrite I get a 404 (not the custom one) When set to standard I get this:

 

Warning: Cannot modify header information - headers already sent by (output started at /home/xxxx/public_html/shop/includes/filenames.php:63) in /home/xxxx/public_html/shop/includes/modules/ultimate_seo_urls5/classes/Usu_Validator.php on line 227

 

Warning: Cannot modify header information - headers already sent by (output started at /home/xxxx/public_html/shop/includes/filenames.php:63) in /home/xxxx/public_html/shop/includes/modules/ultimate_seo_urls5/classes/Usu_Validator.php on line 228

 

configure.php

 

define('HTTP_SERVER', 'http://ipaddress/~xxxx');

define('HTTPS_SERVER', 'https://ipaddress/~xxxx');

define('ENABLE_SSL', true);

define('HTTP_COOKIE_DOMAIN', 'ipaddress/~xxxx');

define('HTTPS_COOKIE_DOMAIN', 'ipaddress/~xxxx');

define('HTTP_COOKIE_PATH', '/shop/');

define('HTTPS_COOKIE_PATH', '/shop/');

define('DIR_WS_HTTP_CATALOG', '/shop/');

define('DIR_WS_HTTPS_CATALOG', '/shop/');

define('DIR_FS_CATALOG', '/home/xxxx/public_html/shop/');

Headers Already Sent

 

Click the link above for an explanation.

 

The problem is in /shop/includes/filenames.php (line 63)

 

Most likely "whitespace(s)" at the end.


If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you.

 

"Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice."

- Me -

 

"Headers already sent" - The definitive help

 

"Cannot redeclare ..." - How to find/fix it

 

SSL Implementation Help

 

Like this post? "Like" it again over there >

Share this post


Link to post
Share on other sites

Headers Already Sent

 

Click the link above for an explanation.

 

The problem is in /shop/includes/filenames.php (line 63)

 

Most likely "whitespace(s)" at the end.

 

 

I fixed that and now I get the 404 (on ie) or I get

 

The page isn't redirecting properly

 

Firefox has detected that the server is redirecting the request for this address in a way that will never complete.

 

* This problem can sometimes be caused by disabling or refusing to accept

cookies.

 

This is also the message on debug that I found odd

http://myipaddress/xxxx/shop/product_info.php/mobile-p-29

Edited by swtnhpy

Share this post


Link to post
Share on other sites

great contribution and really appreciate the work!

 

Something that puzzles me tough is

a ) after checkout & payment with an order, I get the 404 USU page. the URL of the page I get is : index.php?&action=notify&notify[]=&osCsid=. Looks like he is hanging on the notify[] values?

B ) I made a little modification to the store which passes a GET parameter to the index.php page. USU doesn't like that and throws a 404 error. Any idea how I can solve this in a way that my custom code would still be executed? Or eventually how can I catch this within USU and perform the custom code there?

 

I figured out that for B I have to create my own module, but I'm still stuck with point A.

Anybody that has insights? This is from the default oscommerce so somebody should have had it before?

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×