Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

ULTIMATE Seo Urls 5 - by FWR Media


Recommended Posts

Robert

 

 

looking at my server's error log I noticed a lot of this kind of entries occuring when someone uses languages other than English:

 

 

 

 

Is there a way to avoid that?

 

Well the file doesn't exist but .htaccess redirects those links ( if you installed it correctly ).

Link to comment
Share on other sites

this is my .htaccess, can you check if something needs editing please?

 

Options +SymLinksIfOwnerMatch

<IfModule mod_rewrite.c>

RewriteEngine On

 

# RewriteBase instructions

# Change RewriteBase dependent on how your shop is accessed as below.

# http://www.mysite.com = RewriteBase /

# http://www.mysite.com/catalog/ = RewriteBase /catalog/

# http://www.mysite.com/catalog/shop/ = RewriteBase /catalog/shop/

 

# Change RewriteBase using the instructions above

RewriteBase /

RewriteRule ^([a-z0-9/-]+)-p-([0-9]+).html$ product_info.php [NC,L,QSA]

RewriteRule ^([a-z0-9/-]+)-c-([0-9_]+).html$ index.php [NC,L,QSA]

RewriteRule ^([a-z0-9/-]+)-m-([0-9]+).html$ index.php [NC,L,QSA]

RewriteRule ^([a-z0-9/-]+)-pi-([0-9]+).html$ popup_image.php [NC,L,QSA]

RewriteRule ^([a-z0-9/-]+)-pr-([0-9]+).html$ product_reviews.php [NC,L,QSA]

RewriteRule ^([a-z0-9/-]+)-pri-([0-9]+).html$ product_reviews_info.php [NC,L,QSA]

# Articles contribution

RewriteRule ^([a-z0-9/-]+)-t-([0-9_]+).html$ articles.php [NC,L,QSA]

RewriteRule ^([a-z0-9/-]+)-au-([0-9]+).html$ articles.php [NC,L,QSA]

RewriteRule ^([a-z0-9/-]+)-a-([0-9]+).html$ article_info.php [NC,L,QSA]

# Information pages

RewriteRule ^([a-z0-9/-]+)-i-([0-9]+).html$ information.php [NC,L,QSA]

# Links contribution

RewriteRule ^([a-z0-9/-]+)-links-([0-9_]+).html$ links.php [NC,L,QSA]

# Newsdesk contribution

RewriteRule ^([a-z0-9/-]+)-n-([0-9]+).html$ newsdesk_info.php [NC,L,QSA]

RewriteRule ^([a-z0-9/-]+)-nc-([0-9]+).html$ newsdesk_index.php [NC,L,QSA]

RewriteRule ^([a-z0-9/-]+)-nri-([0-9]+).html$ newsdesk_reviews_info.php [NC,L,QSA]

RewriteRule ^([a-z0-9/-]+)-nra-([0-9]+).html$ newsdesk_reviews_article.php [NC,L,QSA]

</IfModule>

~ Don't mistake my kindness for weakness ~

Link to comment
Share on other sites

this is my .htaccess, can you check if something needs editing please?

 

 

 

That's fine, I've no idea why your particular server is kicking out "file not found".

 

Have you tried accessing the specific links in the log?

Link to comment
Share on other sites

Yes I have, they load fine, they all exist. Even if I try mysite.com/fr, it redirects to index.php/fr which is fine, but I don't understand why the server says "file not found".

~ Don't mistake my kindness for weakness ~

Link to comment
Share on other sites

Yes I have, they load fine, they all exist. Even if I try mysite.com/fr, it redirects to index.php/fr which is fine, but I don't understand why the server says "file not found".

 

I don't know .. weird server setup I suppose, it obviously is working as intended. Speak to the server techies.

Link to comment
Share on other sites

I spoke to server techies, they seem to think this is normal behaviour for the server when the actual folder, ie: mysite.com/fr does not physically exist on the server. This is what they told me:

 

The 'fr' folder is not a physical folder on your server. Your OSCommerce store is using /fr/ as a pointer to its internal information and sending a page for it as necessary.

 

root@server [/home/username/public_html]# ls fr

/bin/ls: fr: No such file or directory

~ Don't mistake my kindness for weakness ~

Link to comment
Share on other sites

I spoke to server techies, they seem to think this is normal behaviour for the server when the actual folder, ie: mysite.com/fr does not physically exist on the server. This is what they told me:

 

 

 

Well ok but they should be aware that .htaccess is redirecting correctly so the server error log is wrong in this case and irrelevant.

Edited by FWR Media
Link to comment
Share on other sites

Ha, I told them so but...as always, they say they are right and I am wrong. ;)

 

Ok well try this with them: -

 

Your server has mod_rewrite and therefore accepts RewriteRules.

 

One such RewriteRule is: -

 

  RewriteRule ^([a-z0-9/-]+)-p-([0-9]+).html$ product_info.php [NC,L,QSA]

 

RewriteBase is correct btw.

 

As you'll be aware this RewriteRule would action the following URL: -

 

www.mysite.com/fr/my-french-product-p-178.html

 

Which will be redirected to product_info.php as you would expect.

 

So .. it all works as expected.

 

My question is: -

 

Why therefore does your server record an error?

Link to comment
Share on other sites

Hi Robert, I have just updated to v205 and got a problem:

 

When I click on a category the redirect is wrong and the site breaks.

 

Keeping the update for htaccess and the function in general.php

and reverting includes/modules/ultimate_seo_urls5 to the previous version, then the error disappear.

 

I have looked into the server log, no errors reported.

 

But, in the error.log I got:

[26-Mar-2011 21:18:39] PHP Fatal error: Call to undefined method Sqlite_Cache_Module::admini() in /home/xxxx/public_html/admin/includes/functions/general.php on line 1680

 

 

If that's the problem, how do I fix it?

 

Sara

Link to comment
Share on other sites

Hi Robert, I have just updated to v205 and got a problem:

 

When I click on a category the redirect is wrong and the site breaks.

 

Keeping the update for htaccess and the function in general.php

and reverting includes/modules/ultimate_seo_urls5 to the previous version, then the error disappear.

 

I have looked into the server log, no errors reported.

 

But, in the error.log I got:

[26-Mar-2011 21:18:39] PHP Fatal error: Call to undefined method Sqlite_Cache_Module::admini() in /home/xxxx/public_html/admin/includes/functions/general.php on line 1680

 

 

If that's the problem, how do I fix it?

 

Sara

 

Hi Sara looks like your hosts have not enabled SQLite in PHP for some reason .. choose another cache strategy.

Link to comment
Share on other sites

Ok well try this with them: -

 

Your server has mod_rewrite and therefore accepts RewriteRules.

 

One such RewriteRule is: -

 

  RewriteRule ^([a-z0-9/-]+)-p-([0-9]+).html$ product_info.php [NC,L,QSA]

 

RewriteBase is correct btw.

 

As you'll be aware this RewriteRule would action the following URL: -

 

www.mysite.com/fr/my-french-product-p-178.html

 

Which will be redirected to product_info.php as you would expect.

 

So .. it all works as expected.

 

My question is: -

 

Why therefore does your server record an error?

 

I've been talking about this with them for hours now....the only answer I am given is that in

www.mysite.com/fr/my-french-product-p-178.html

"fr" is not a physical folder present on the server but rather a pointer sending a page, therefore it throws an error (because the folder doesn't physically exist).

Weird.

I would have thought that seeing as ultimately, it leads to an existing file (ie: product_info.php) then, ultimately, there is no error, do you agree?

~ Don't mistake my kindness for weakness ~

Link to comment
Share on other sites

Hi Robert, I think I found the misstake I made: I uploaded the uploads directory only, and forgot the character_conversion_pack :)

After fixing that, the site is up and running again. I must say you are just brilliant. Your contribs are fantastic! Thank you so much Robert!

Link to comment
Share on other sites

Hi Robert, I think I found the misstake I made: I uploaded the uploads directory only, and forgot the character_conversion_pack :)

After fixing that, the site is up and running again. I must say you are just brilliant. Your contribs are fantastic! Thank you so much Robert!

 

My pleasure Sara and thanks for the kind comments.

Edited by FWR Media
Link to comment
Share on other sites

You are most welcome! By the way I noticed that there are two instances of "character_conversion".

One in the extras as "character_conversion_pack" and one in the uploads directory as "character_conversion".

The latter is empty... Thought you would like to know. (I copied the languages from the former to my site).

Sara

Link to comment
Share on other sites

Basic questions are just fine .. we all started somewhere.

 

In the instructions: -

 

catalog/.htaccess ( only needed if you intend to use rewrite urls )

 

catalog relates to the osCommerce shop root .. because some users install into server root and others install into a directory like catalog or shop or other .. we use the term "catalog" to relate to wherever the osCommerce shop root may be.

 

Hope that makes sense.

 

Hey,

 

Sorry I'm still not quite getting it :(

 

At the moment the .htaccess file in the catalogue directory looks like:

 

# $Id$
#
# This is used with Apache WebServers
#
# For this to work, you must include the parameter 'Options' to
# the AllowOverride configuration
#
# Example:
#
# <Directory "/usr/local/apache/htdocs">
#   AllowOverride Options
# </Directory>
#
# 'All' with also work. (This configuration is in the
# apache/conf/httpd.conf file)

# The following makes adjustments to the SSL protocol for Internet
# Explorer browsers

#<IfModule mod_setenvif.c>
#  <IfDefine SSL>
#    SetEnvIf User-Agent ".*MSIE.*" \
#             nokeepalive ssl-unclean-shutdown \
#             downgrade-1.0 force-response-1.0
#  </IfDefine>
#</IfModule>

# If Search Engine Friendly URLs do not work, try enabling the
# following Apache configuration parameter

# AcceptPathInfo On

# Fix certain PHP values
# (commented out by default to prevent errors occuring on certain
# servers)

# php_value session.use_trans_sid 0
# php_value register_globals 1

 

Where is this base href you mentioned that had been commented out?

Link to comment
Share on other sites

Sorry I'm still not quite getting it :(

 

Even people who are not new do not get it when they haven't read the instructions ;)

Link to comment
Share on other sites

Problem with heading Last-Modified in Ultimate Seo Urls 5 PRO

 

Unfortunately after installation of this module this heading incorrectly stands out.

It is always equal Last-Modified: Thu, 01 Jan 1970 0:00:00 AM GMT

The problem with transfer products_id in application_top.php where is formed this heading.

 

Prompt what to do

 

In advance thanks, also excuse з my language

 

P/S

In ULTIMATE Seo Urls 5 - by FWR Media it worked

Edited by OlegEk
Link to comment
Share on other sites

Even people who are not new do not get it when they haven't read the instructions ;)

 

Ahah yes! I must have missed that bit of the instructions the first time round hehe.

 

Ok so I've now changed my .htaccess to:

 

....htaccess code...

 

However now when I try to get into the admin section (it has the admin folder name changed btw) it gives me this error:

 

Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator, [email protected] and inform them of the time the error occurred, and anything you might have done that may have caused the error.

More information about this error may be available in the server error log.

Additionally, a 500 Internal Server Error error was encountered while trying to use an ErrorDocument to handle the request.

 

In the instructions it mentions:

 

#

 

A note on *nix server settings for RewriteRules

 

mod_rewrite must be compiled in apache and AllowOverride set to ALL in httpd.conf ( usually this is already in place )

 

What am I supposed to be doing here? Again sorry for all the questions heh, I generaly know enough PHP to get by, but I've never had to tweak the .htaccess files...

Edited by LewisM
Link to comment
Share on other sites

What am I supposed to be doing here? Again sorry for all the questions heh, I generaly know enough PHP to get by, but I've never had to tweak the .htaccess files...

 

Please don't post whole files it makes the support thread a nightmare to read by others.

 

The changes to .htaccess were for catalog/.htaccess NOT catalog/ADMIN/.htaccess

Link to comment
Share on other sites

Problem with heading Last-Modified in Ultimate Seo Urls 5 PRO

 

Unfortunately after installation of this module this heading incorrectly stands out.

It is always equal Last-Modified: Thu, 01 Jan 1970 0:00:00 AM GMT

The problem with transfer products_id in application_top.php where is formed this heading.

 

Prompt what to do

 

In advance thanks, also excuse з my language

 

P/S

In ULTIMATE Seo Urls 5 - by FWR Media it worked

 

Oleg

 

I haven't a clue what you mean.

 

USU5 does not anywhere issue last modified headers. ( unless you are talking about sitemaps ).

Link to comment
Share on other sites

Please don't post whole files it makes the support thread a nightmare to read by others.

 

The changes to .htaccess were for catalog/.htaccess NOT catalog/ADMIN/.htaccess

 

Sorry my mistake, I'll edit it out.

 

And that was the catalogue .htaccess, the admin one is different again :blink:

Link to comment
Share on other sites

If you want to use ReWriteRules you have to have either ISAPI rewrite or IIS rewrite installed on the server, you will also have to have the .htaccess rules converted

If you do this please email me a copy to help future IIS users.

 

Is this maybe the problem?

 

In the .htaccess file it says:

 

# For this to work, you must include the parameter 'Options' to
# the AllowOverride configuration
#
# Example:
#
# <Directory "/usr/local/apache/htdocs">
#   AllowOverride Options
# </Directory>
#
# 'All' with also work. (This configuration is in the
# apache/conf/httpd.conf file)

 

But I don't have an apache folder...gah way out of my depth here :lol:

Link to comment
Share on other sites

Oleg

 

I haven't a clue what you mean.

 

USU5 does not anywhere issue last modified headers. ( unless you are talking about sitemaps ).

 

That that blocks transfer products_id after installation Enable SEO URLs 5 in true.

If to expose Enable SEO URLs 5 in false such problem is not present.

And this effect has appeared in pro versions

 

Here date of updating of page is checked. It does not work, as products_id is not transferred (application_top.php)

 

if ($headers{'If-Modified-Since'}) {

 

if (is_integer(strpos($_SERVER{'SCRIPT_NAME'}, "/product_info.php"))){$table=TABLE_PRODUCTS;$modified_field="products_";}

if (is_integer(strpos($_SERVER{'SCRIPT_NAME'}, "/newsdesk_info.php"))){$table=TABLE_NEWSDESK;$modified_field="newsdesk_";}

if (is_integer(strpos($_SERVER{'SCRIPT_NAME'}, "product_reviews_info.php"))){$table=TABLE_REVIEWS;$modified_field="";$modified_add="reviews_";}

if ($table) {

$id=(int)$_GET[$modified_field.$modified_add."id"];

$product_check_query = tep_db_query("select " . $modified_field . "date_added , " . $modified_field . "last_modified FROM " . $table . " WHERE ". $modified_field . $modified_add . "id=" . $id);

$product_modify = tep_db_fetch_array($product_check_query);

 

$date_added=$product_modify[$modified_field . "date_added"];

 

if ($product_modify{$modified_field."last_modified"}) {$date_added=$product_modify[$modified_field."last_modified"];};

 

if (strtotime($date_added)<(strtotime($headers{'If-Modified-Since'}))) {

header ('Content-Type: text/html; charset=WINDOWS-1251');

header ('HTTP/1.0 304 Not Modified');

die; // Don't send any more output.

} else {

header ('Content-Type: text/html; charset=WINDOWS-1251');

header("Last-Modified: ".gmdate("D, d M Y G:i:s T",strtotime($date_added)));

}

}

}

Edited by OlegEk
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...