Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

ULTIMATE Seo Urls 5 - by FWR Media


Recommended Posts

Here is my .htaccess file

Robert will know for sure, but do you have a .htacess file with rewrite rules in your store's folder, as i think you will need one in there to. As store urls are not seo, and i should not get, page not found on a link like this http://www.koolkatjazz.com/catalog/index.php?cPath=31

Edited by steve_s
Link to comment
Share on other sites

Robert will know for sure, but do you have a .htacess file with rewrite rules in your store's folder, as i think you will need one in there to. As store urls are not seo, and i should not get, page not found on a link like this http://www.koolkatjazz.com/catalog/index.php?cPath=31

 

There are only a few things that cause this type of issue.

 

1) RewriteBase is wrong (yours is correct)

2) .htaccess must be in http://www.koolkatjazz.com/catalog/

3) mod_rewrite must be compiled in apache

4) Must be a *nix server

5) on some odd server set ups you have to comment out ..

#Options +FollowSymLinks

6) AllowOveride must be ALL to allow .htaccess RewriteRules

 

Also you have added stuff, try removing the entries that are not a part of the contribution e.g.

 

Why is there a condition above the rewriterules?

 

RewriteCond %{QUERY_STRING} ^options\=(.*)$

Edited by FWR Media
Link to comment
Share on other sites

I am having the same exact issue. It was working fine before. The only resent change that I made was I added the Basic Design Pack contribution ( http://www.oscommerce.com/community/contributions,3570/ )

 

Oh,

 

Also, in my effort to secure the site, I also followed some of the tips on this thread http://www.oscommerce.com/forums/index.php?showtopic=313323 particularly by setting each and single file with 644 file permissions (except the two configure.php files) Could this have caused the problem?

Link to comment
Share on other sites

I am having the same exact issue. It was working fine before. The only resent change that I made was I added the Basic Design Pack contribution ( http://www.oscommerce.com/community/contributions,3570/ )

 

Oh,

 

Also, in my effort to secure the site, I also followed some of the tips on this thread http://www.oscommerce.com/forums/index.php?showtopic=313323 particularly by setting each and single file with 644 file permissions (except the two configure.php files) Could this have caused the problem?

 

The basic design pack has over written your includes/functions/html_output.php and your includes/footer.php

you will need to do this

in catalog/includes/functions/html_output.php

Find (complete function) ...

//// 
// The HTML href link wrapper function 
 function tep_href_link($page = '', $parameters = '', $connection = 'NONSSL', $add_session_id = true, $search_engine_safe = true) { 
global $request_type, $session_started, $SID; 

if (!tep_not_null($page)) { 
  die('</td></tr></table></td></tr></table><br><br><font color="#ff0000"><b>Error!</b></font><br><br><b>Unable to determine the page link!<br><br>'); 
} 

if ($connection == 'NONSSL') { 
  $link = HTTP_SERVER . DIR_WS_HTTP_CATALOG; 
} elseif ($connection == 'SSL') { 
  if (ENABLE_SSL == true) { 
	$link = HTTPS_SERVER . DIR_WS_HTTPS_CATALOG; 
  } else { 
	$link = HTTP_SERVER . DIR_WS_HTTP_CATALOG; 
  } 
} else { 
  die('</td></tr></table></td></tr></table><br><br><font color="#ff0000"><b>Error!</b></font><br><br><b>Unable to determine connection method on a link!<br><br>Known methods: NONSSL SSL</b><br><br>'); 
} 

if (tep_not_null($parameters)) { 
  $link .= $page . '?' . tep_output_string($parameters); 
  $separator = '&'; 
} else { 
  $link .= $page; 
  $separator = '?'; 
} 

while ( (substr($link, -1) == '&') || (substr($link, -1) == '?') ) $link = substr($link, 0, -1); 

// Add the session ID when moving from different HTTP and HTTPS servers, or when SID is defined 
if ( ($add_session_id == true) && ($session_started == true) && (SESSION_FORCE_COOKIE_USE == 'False') ) { 
  if (tep_not_null($SID)) { 
	$_sid = $SID; 
  } elseif ( ( ($request_type == 'NONSSL') && ($connection == 'SSL') && (ENABLE_SSL == true) ) || ( ($request_type == 'SSL') && ($connection == 'NONSSL') ) ) { 
	if (HTTP_COOKIE_DOMAIN != HTTPS_COOKIE_DOMAIN) { 
	  $_sid = tep_session_name() . '=' . tep_session_id(); 
	} 
  } 
} 

if ( (SEARCH_ENGINE_FRIENDLY_URLS == 'true') && ($search_engine_safe == true) ) { 
  while (strstr($link, '&&')) $link = str_replace('&&', '&', $link); 

  $link = str_replace('?', '/', $link); 
  $link = str_replace('&', '/', $link); 
  $link = str_replace('=', '/', $link); 

  $separator = '?'; 
} 

if (isset($_sid)) { 
  $link .= $separator . tep_output_string($_sid); 
} 

return $link; 
 }

 

Replace with ...

 //// 
// ULTIMATE Seo Urls 5 by FWR Media 
// The HTML href link wrapper function 
 function tep_href_link($page = '', $parameters = '', $connection = 'NONSSL', $add_session_id = true, $search_engine_safe = true) { 
global $seo_urls, $languages_id, $request_type, $session_started, $sid;				 
if ( !is_object($seo_urls) ){ 
  include_once DIR_WS_MODULES . 'ultimate_seo_urls5' . DIRECTORY_SEPARATOR . 'classes' . DIRECTORY_SEPARATOR . 'usu.php'; 
  $seo_urls = new usu($languages_id, $request_type, $session_started, $sid); 
} 
return $seo_urls->href_link($page, $parameters, $connection, $add_session_id); 
 }

in catalog/includes/footer.php

Find at the very bottom of the file ..

 

<?php 
 } 
?>

 

Replace with ...

 <?php 
 } 
 // ULTIMATE Seo Urls 5 by FWR Media 
 usu::performance(); 
?>

Edited by steve_s
Link to comment
Share on other sites

Link to comment
Share on other sites

in catalog/includes/footer.php

Find at the very bottom of the file ..

 

<?php 
 } 
?>

 

Replace with ...

 <?php 
 } 
 // ULTIMATE Seo Urls 5 by FWR Media 
 usu::performance(); 
?>

 

Thanks Steve and FWR Media

 

The very bottom of my footer.php currently looks like this

<?php
/*
 The following copyright announcement can only be
 appropriately modified or removed if the layout of
 the site theme has been modified to distinguish
 itself from the default osCommerce-copyrighted
 theme.

 For more information please read the following
 Frequently Asked Questions entry on the osCommerce
 support site:

 http://www.oscommerce.com/community.php/faq,26/q,50

 Please leave this comment intact together with the
 following copyright announcement.
*/

 echo FOOTER_TEXT_BODY
?>
</td>
 </tr>
</table>
</div>

 

Should I replace

<?php
/*
 The following copyright announcement can only be
 appropriately modified or removed if the layout of
 the site theme has been modified to distinguish
 itself from the default osCommerce-copyrighted
 theme.

 For more information please read the following
 Frequently Asked Questions entry on the osCommerce
 support site:

 http://www.oscommerce.com/community.php/faq,26/q,50

 Please leave this comment intact together with the
 following copyright announcement.
*/

 echo FOOTER_TEXT_BODY
?>

 

with

 

 <?php 
 } 
 // ULTIMATE Seo Urls 5 by FWR Media 
 usu::performance(); 
?>

 

and what about that echo FOOTER_TEXT_BODY

Link to comment
Share on other sites

Thanks Steve and FWR Media

 

The very bottom of my footer.php currently looks like this

<?php
/*
 The following copyright announcement can only be
 appropriately modified or removed if the layout of
 the site theme has been modified to distinguish
 itself from the default osCommerce-copyrighted
 theme.

 For more information please read the following
 Frequently Asked Questions entry on the osCommerce
 support site:

 http://www.oscommerce.com/community.php/faq,26/q,50

 Please leave this comment intact together with the
 following copyright announcement.
*/

 echo FOOTER_TEXT_BODY
?>
</td>
 </tr>
</table>
</div>

 

Should I replace

<?php
/*
 The following copyright announcement can only be
 appropriately modified or removed if the layout of
 the site theme has been modified to distinguish
 itself from the default osCommerce-copyrighted
 theme.

 For more information please read the following
 Frequently Asked Questions entry on the osCommerce
 support site:

 http://www.oscommerce.com/community.php/faq,26/q,50

 Please leave this comment intact together with the
 following copyright announcement.
*/

 echo FOOTER_TEXT_BODY
?>

 

with

 

 <?php 
 } 
 // ULTIMATE Seo Urls 5 by FWR Media 
 usu::performance(); 
?>

 

and what about that echo FOOTER_TEXT_BODY

in your footer find

	</td>
 </tr>
</table>
</div>

 

add after it

<?php
 // ULTIMATE Seo Urls 5 by FWR Media
 usu::performance();
?>

Link to comment
Share on other sites

There are only a few things that cause this type of issue.

 

1) RewriteBase is wrong (yours is correct)

2) .htaccess must be in http://www.koolkatjazz.com/catalog/

3) mod_rewrite must be compiled in apache

4) Must be a *nix server

5) on some odd server set ups you have to comment out ..

#Options +FollowSymLinks

6) AllowOveride must be ALL to allow .htaccess RewriteRules

 

Also you have added stuff, try removing the entries that are not a part of the contribution e.g.

 

Why is there a condition above the rewriterules?

 

RewriteCond %{QUERY_STRING} ^options\=(.*)$

 

Here is the replay from my host.

 

Hi,

 

Our server meets al the requiremsnts for the SEO program.

 

1) RewriteBase is wrong (yours is correct)

2) .htaccess must be in http://www.koolkatjazz.com/catalog/ (correct).

 

3) mod_rewrite must be compiled in apache

 

mod_rewrite is compiled using apache in our servers

 

4) Must be a *nix server

 

Our server is linux server

 

5) on some odd server set ups you have to comment out ..

#Options +FollowSymLinks

 

It is not enabled in your account. You can enable it in your .htaccess or disable it.

 

6) AllowOveride must be ALL to allow .htaccess RewriteRules

 

You can configure AllowOveride by using .htaccess

 

Please let us know if you need any further assistance.

 

 

 

Thank you.

---

Tina Garrison

Technical Support Team

TotalChoice Hosting

Link to comment
Share on other sites

Here is the replay from my host.

is your host using php5? it seems godaddy use both

PHP4 or PHP5

Custom PHP.ini/PHP5.ini

 

login store's admin click on tools server and see what version of php it is using

Edited by steve_s
Link to comment
Share on other sites

Here is the replay from my host.

 

Pederb this is really quite simple and is not a bug of the contribution .. I think I should make clear.

 

http://www.koolkatjazz.com/catalog/test-pressings-c-52.html

 

Is written correctly by the contribution.

 

It then comes into your server and IS NOT rewritten, which is why you get "page not found"

 

Your hosts say ..

 

You can configure AllowOveride by using .htaccess

 

Which as far as I am concerned is utter rubbish because ..

 

What you can put into .htaccess files (or "distributed configuration files") is determined by the AllowOverride directive. This directive is set in http.conf it therefore cannot set itself in .htaccess :rolleyes:

 

I bet (and try this) you could put a load of garbage into .htaccess and the server wouldn't die .. like ..

 

ekjrausik4c5uq4tq53nytnqpr4yh7gg2tcqnrh8anhfh8hahrc7hnh4q

 

I no longer see this as an issue to be discussed in the Ultimate Seo Urls support thread as it is not an issue with the contribution but an issue with your server set up.

 

Do let us know when you get it sorted though.

Edited by FWR Media
Link to comment
Share on other sites

Pederb this is really quite simple and is not a bug of the contribution .. I think I should make clear.

 

http://www.koolkatjazz.com/catalog/test-pressings-c-52.html

 

Is written correctly by the contribution.

 

It then comes into your server and IS NOT rewritten, which is why you get "page not found"

 

Your hosts say ..

 

 

 

Which as far as I am concerned is utter rubbish because ..

 

What you can put into .htaccess files (or "distributed configuration files") is determined by the AllowOverride directive. This directive is set in http.conf it therefore cannot set itself in .htaccess :rolleyes:

 

I bet (and try this) you could put a load of garbage into .htaccess and the server wouldn't die .. like ..

 

ekjrausik4c5uq4tq53nytnqpr4yh7gg2tcqnrh8anhfh8hahrc7hnh4q

 

I no longer see this as an issue to be discussed in the Ultimate Seo Urls support thread as it is not an issue with the contribution but an issue with your server set up.

 

Do let us know when you get it sorted though.

 

I forwarded you answer again to my host

 

Cheers

Link to comment
Share on other sites

Buy now buttons and split page results showing wrong uris

 

Two people so far (guigs and a12c4magic) have had issues where incorrect links were produced for buy now buttons and the split page results links.

 

This has now been solved thanks to guigs who very generously gave me access to his live shop to find the issue .. thanks guigs.

 

So what was it?

 

$PHP_SELF ($_SERVER['PHP_SELF']) is used in osCommerce to identify the current page PHP_SELF however should not be used for several reasons the main ones being that it can be spoofed and is unreliable. In this case basename($PHP_SELF) as used in split_page_results.php was not returning the current file but returning part of an seo url like .. my-product-c-32. The correct thing to do is use the reliable $_SERVER['SCRIPT_NAME'] instead.

 

What do I do to make it work?

 

catalog/includes/application_top.php

 

Find ..

 

  if (!isset($PHP_SELF)) $PHP_SELF = basename($_SERVER['SCRIPT_NAME']);

 

Replace with ..

 

  if( !isset($PHP_SELF) || (isset($PHP_SELF) && (false === (substr(basename($PHP_SELF), -4, 4) == '.php'))) ){
$PHP_SELF = basename($_SERVER['SCRIPT_NAME']);
 }

 

Thank you very much!

 

Here is my contribution for character conversion:

 

portugues.php

  $char_convert = array(
'à' => 'a', 'â' => 'a', 'á' => 'a', 'ã' => 'a',
'ê' => 'e', 'ë' => 'e', 'é' => 'e',
'ô' => 'o', 'ó' => 'o', 'õ' => 'o', 'ö' => 'o',
'ú' => 'u', 'ü' => 'u',
'í' => 'i', 'ç' => 'c', 'ñ' => 'n',
'À' => 'A', 'Â' => 'A', 'Á' => 'A', 'Ã' => 'A',
'Ê' => 'E', 'Ë' => 'E', 'É' => 'E',
'Ô' => 'O', 'Ó' => 'O', 'Õ' => 'O', 'Ö' => 'O',
'Ú' => 'U', 'Ü' => 'U',
'Í' => 'I', 'Ç' => 'C', 'Ñ' => 'N',
'ª' => 'a', 'º' => 'o'
 );

Link to comment
Share on other sites

Thank you very much!

 

Here is my contribution for character conversion:

 

portugues.php

  $char_convert = array(
'à' => 'a', 'â' => 'a', 'á' => 'a', 'ã' => 'a',
'ê' => 'e', 'ë' => 'e', 'é' => 'e',
'ô' => 'o', 'ó' => 'o', 'õ' => 'o', 'ö' => 'o',
'ú' => 'u', 'ü' => 'u',
'í' => 'i', 'ç' => 'c', 'ñ' => 'n',
'À' => 'A', 'Â' => 'A', 'Á' => 'A', 'Ã' => 'A',
'Ê' => 'E', 'Ë' => 'E', 'É' => 'E',
'Ô' => 'O', 'Ó' => 'O', 'Õ' => 'O', 'Ö' => 'O',
'Ú' => 'U', 'Ü' => 'U',
'Í' => 'I', 'Ç' => 'C', 'Ñ' => 'N',
'ª' => 'a', 'º' => 'o'
 );

 

Thanks Guilherme much appreciated.

Link to comment
Share on other sites

Pederb this is really quite simple and is not a bug of the contribution .. I think I should make clear.

 

http://www.koolkatjazz.com/catalog/test-pressings-c-52.html

 

Is written correctly by the contribution.

 

It then comes into your server and IS NOT rewritten, which is why you get "page not found"

 

Your hosts say ..

 

 

 

Which as far as I am concerned is utter rubbish because ..

 

What you can put into .htaccess files (or "distributed configuration files") is determined by the AllowOverride directive. This directive is set in http.conf it therefore cannot set itself in .htaccess :rolleyes:

 

I bet (and try this) you could put a load of garbage into .htaccess and the server wouldn't die .. like ..

 

ekjrausik4c5uq4tq53nytnqpr4yh7gg2tcqnrh8anhfh8hahrc7hnh4q

 

I no longer see this as an issue to be discussed in the Ultimate Seo Urls support thread as it is not an issue with the contribution but an issue with your server set up.

 

Do let us know when you get it sorted though.

 

Robert,

 

I noticed that the contribution seem to work only outside of /catalog/ if you go to www.koolkatjazz.com and click as you did on testpressing with writes it correct but if you try to do the same here www.koolkatjazz.com/catalog/ you will get a different address

Link to comment
Share on other sites

Robert,

 

I noticed that the contribution seem to work only outside of /catalog/ if you go to www.koolkatjazz.com and click as you did on testpressing with writes it correct but if you try to do the same here www.koolkatjazz.com/catalog/ you will get a different address

Question is how is your store urls being writen in root of your website? what is doing it?, what changes you made?, we dont know what you have done code wise.

 

http://www.koolkatjazz.com/catalog/test-pressings-c-52.html in root of store

same url in your store http://www.koolkatjazz.com/catalog/index.php?cPath=52

 

so what changes have you made?

Edited by steve_s
Link to comment
Share on other sites

Robert,

 

I noticed that the contribution seem to work only outside of /catalog/ if you go to www.koolkatjazz.com and click as you did on testpressing with writes it correct but if you try to do the same here www.koolkatjazz.com/catalog/ you will get a different address

 

Your server has some seriously odd settings

 

http://www.koolkatjazz.com/catalog/Bootlegs-c-54.html

 

Produces ..

 

The requested URL /public_html/index.php was not found on this server.

Link to comment
Share on other sites

Your server has some seriously odd settings

 

http://www.koolkatjazz.com/catalog/Bootlegs-c-54.html

 

Produces ..

 

The requested URL /public_html/index.php was not found on this server.

 

I just remembered that the index/landing page outside of catalog was manually hotlinked so now when the SEO is not working correctly it still gives the old SEO address.

Edited by pederb
Link to comment
Share on other sites

I just remembered that the index/landing page outside of catalog was manually hotlinked so now when the SEO is not working correctly it still gives the old SEO address.

 

Ok look Pederb

 

When people come to this support forum they are looking for support regarding the USU5 module.

 

The module doesn't have issues like you are facing .. your problems are local and related to your files and/or your server only.

 

I support this contribution not everybodies individual server/file issues .. you filling this thread with "personal" stuff will just make it difficult for others to seek valid support.

 

Go install the old seo urls series 2 .. if it works come back and tell me.

Link to comment
Share on other sites

Ok look Pederb

 

When people come to this support forum they are looking for support regarding the USU5 module.

 

The module doesn't have issues like you are facing .. your problems are local and related to your files and/or your server only.

 

I support this contribution not everybodies individual server/file issues .. you filling this thread with "personal" stuff will just make it difficult for others to seek valid support.

 

Go install the old seo urls series 2 .. if it works come back and tell me.

 

That's what I updgraded from and I'm not sure I understand what you consider personal stuff? Since you said in a earlier post that contribution was working fine I just wanted to tell you that you where probably testing it from my landing page.

 

Series 2 worked fine for me but 5 does not, and I was hoping that you could help me get 5 to work but if not, well I guess I'm screwed

Edited by pederb
Link to comment
Share on other sites

Hi Peder,

 

I am sorry for the delay. I have gone through your issue but cannot found any errors on server side. The server is setup to support your account. Also there is no issues with .htaccess and redirects. It seems to some thing related to your script. So can you please double check it . Then please get back to us.

 

 

 

 

Thank you.

 

Regards,

Ellis Hadley

Technical Support, TotalChoiceHosting, LLC.

 

Well I guess I'm stuck between a rock and a hard place

Link to comment
Share on other sites

Well I guess I'm stuck between a rock and a hard place

 

I'm happy to take a look at the site. If you want. If it works (worked) with series 2 then I'd be interested to find what the issue is.

 

It seems to be "sort of" working now .. except when you click the catalog breadcrumb the urls revert to standard osCommerce .. very odd.

Link to comment
Share on other sites

I'm happy to take a look at the site. If you want. If it works (worked) with series 2 then I'd be interested to find what the issue is.

 

It seems to be "sort of" working now .. except when you click the catalog breadcrumb the urls revert to standard osCommerce .. very odd.

 

Rob i found this wrong with peter's .htaccess file he posted

RewriteRule ^(.*)-p-(.*).html$ product_info.php?products_id=$2%1

RewriteRule ^(.*)-p-([0-9]+).html$ product_info.php?products_id=$2&%{QUERY_STRING}

 

I just tried his site and even breadcrumb works now, i wonder if he had page cache or something like that

Edited by steve_s
Link to comment
Share on other sites

I had same problem as peter, just installed it, and it wasn't rewriting the urls after upgrading from version 2.2d, i had reset cache, so what i did was to turn seo url's off, clicked on a few links in store, then turned seo url's back on and it worked fine :)

 

Thanks Rob, wasnt able to get version 2.2d to rewrite on my localhost, but it worked when i uploaded it to my host, now i have seo url's on my localhost.

 

Thanks for the contribution :D :D :D :D

Edited by steve_s
Link to comment
Share on other sites

Hi:

 

I added your ULTIMATE Seo Urls 5 (Revision 76) contribution on my site and it works great on it's own. But I found that it does not play nice with the following contributions:

Header Tags SEO V 3.1.4 and Google XML Sitemap SEO (both jack_mcs releases).

 

Here is what I found, with :

ULTIMATE Seo Urls 5 -> the Google XML Sitemap SEO does not produce the new seo urls instead sticking with the old product_info.php?products_id=XX format. Even tried both the rewrite (mysite.com/great-product-p-3.html) or the standard (mysite.com/product_info.php/great-product-p-3) formats. I even tried the sitemap.class_Alternate file for Google XML Sitemap SEO but broke the sitemaps.

 

with:

ULTIMATE Seo Urls 5 rewrite setting -> the Header Tags SEO (V 3.1.4) contribution will make the meta tags.

ULTIMATE Seo Urls 5 standard setting -> the Header Tags SEO (V 3.1.4) contribution will not make the meta tags.

 

Even tried clearing my browser's cache, closing a re-opening, but nothing worked.

 

I wanted to let you know about this because both of the other contributions (by Jack_mcs) are very popular. And I really like this contribution because it is especially written for php 5 (I'm running PHP version 5.2.9), and was recommended by Pektsekye over the older Ultimate SEO URLs contribution.... so I would like to keep it.

 

So...any suggestions/help would be appreciated.

 

BTW... I also posted a similar post to jack_mcs in the Google xml sitemap forum to let him know too. ( http://www.oscommerce.com/forums/index.php?showtopic=330175 )

 

Thanks!

 

Sincerely,

Ken

Edited by NolaMan
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...