Jump to content
Sign in to follow this  
FWR Media

[Contribution] Independent SEO URL Validation

Recommended Posts

Hi,

 

I installed 2.1d but I still got the "too many redirects" problem and also I lost the SEO urls for my links which was a big issue for my links exchange, so I reverted back to 2.2.2e. I have read somewhere the too many redirects can be caused by a wrong htaccess configuration. Maybe Jack can help...

 

Thanks for your reply anyway.

 

Best regards,

 

Florence

 

Which 2.1d? 2.1d Updated does not have redirect problems, it also produces SEO URLs just fine..

 

I have read somewhere the too many redirects can be caused by a wrong htaccess configuration.

 

Badly configured .htaccess can cause all sorts of issues, but in the context of just the SEO URLs contribution the only problem that people encounter are ..

 

1) Incorrect RewriteBase

2) mod_rewrite not enabled.

3) AllowOveride incorrectly set on the server..

Share this post


Link to post
Share on other sites

Hi,

 

I hope someone can help me to solve my problem. I've installed the seo validation without any problem or error message. In my website almost all categories have two sub-categories inside, so now after the contribution I can't open any category but if I disable the validation in my Admin then the categories work again.

 

Please let me know how I could fix this. Thank you so much.

 

Meg

Share this post


Link to post
Share on other sites

Thanks to yourself FWR and to googlejunkie for posting to move from SEF to USEO.

 

I completely removed SEF, i installed 2.1d of Ultimate SEO from your upload. Installed it in minutes, very handy and quick.

 

I then noticed this contribute... Again installation could not have been easier! Fool proof, so well done on that.

 

SO onto the problem. Since installing it I have the new FWR URL Validation in my admin section ... the SECOND i turn it on and click on a category or product my status bar just goes very slowly to 100% and then keeps searching and searching. In firefox it just give me a "The page isn't redirecting properly"

 

And then once i turn it off again the page that was on 100% loading for the last 10 minutes straight away loads.

 

Any idea whats going on ??? Seems like an infinite loop or something.

Share this post


Link to post
Share on other sites
Thanks to yourself FWR and to googlejunkie for posting to move from SEF to USEO.

 

I completely removed SEF, i installed 2.1d of Ultimate SEO from your upload. Installed it in minutes, very handy and quick.

 

I then noticed this contribute... Again installation could not have been easier! Fool proof, so well done on that.

 

SO onto the problem. Since installing it I have the new FWR URL Validation in my admin section ... the SECOND i turn it on and click on a category or product my status bar just goes very slowly to 100% and then keeps searching and searching. In firefox it just give me a "The page isn't redirecting properly"

 

And then once i turn it off again the page that was on 100% loading for the last 10 minutes straight away loads.

 

Any idea whats going on ??? Seems like an infinite loop or something.

 

Check this thread/installation instructions for .htaccess settings.

 

Usually ReWritebase is incorrectly set.

 

If correct ..

 

Is it a linux server?

Is mod_rewrite enabled on the server?

Is AllowOveride set correctly to allow .htacess to change settings?

Share this post


Link to post
Share on other sites

I think I am using the exact same htaccess as what is posted on the forum, I have Ultimate SEO working fine with the htaccess so didnt see in the install that anything had to change... if it does then that definitely could be the problem :)

 

Options +FollowSymLinks

RewriteEngine On

RewriteBase /brownieseobase/

 

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

RewriteRule ^(.*)-c-(.*).html$ index.php?cPath=$2&%{QUERY_STRING}

RewriteRule ^(.*)-m-([0-9]+).html$ index.php?manufacturers_id=$2&%{QUERY_STRING}

RewriteRule ^(.*)-pi-([0-9]+).html$ popup_image.php?pID=$2&%{QUERY_STRING}

RewriteRule ^(.*)-t-([0-9]+).html$ articles.php?tPath=$2&%{QUERY_STRING}

RewriteRule ^(.*)-a-([0-9]+).html$ article_info.php?articles_id=$2&%{QUERY_STRING}

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

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

RewriteRule ^(.*)-i-([0-9]+).html$ information.php?info_id=$2&%{QUERY_STRING}

 

 

my rewritebase looks correct as it is set up on www.mydomain.com/brownieseobase/productname-p-123.html

So im guessing /brownieseobase/ is right.

 

 

Is it a linux server? (unix or linux, definitely not windows)

Is mod_rewrite enabled on the server? (must be to have Ultimate seo working)

Is AllowOveride set correctly to allow .htacess to change settings? (same as above)

 

I started with the original files again today (not a fresh osc just someone else was looking after the site before) I installed Ultimate SEO again, that works fine, then installed your contrib and it shows up in the admin no problem.... i turn it on and then when i click on any category or product it just hangs ... the SECOND i turn it off in the admin section which i have open in another window the original window thats hanging opens up :) weird!

 

I've just installed header tag controller and thats working fine aswell, but it did have trouble with Admin Access contribute that is pre-installed before i got my hands on it... do you think i need to include any files in admin access to get this working and if so what files?

 

 

 

And one other thing I'd like your professional opinion on. Doesn't google treat "-" as part of the file name and "_" as a seperate word?

 

So if we have

/gold-necklace-p-123.html

it would treat it all as one thing

 

but If i changed -p- to _p- it would be

/gold-necklace_p-123.html

then google would treat it as gold necklace and then another word p-123 which should be better SEO wise??

 

 

 

 

 

Check this thread/installation instructions for .htaccess settings.

 

Usually ReWritebase is incorrectly set.

 

If correct ..

 

Is it a linux server?

Is mod_rewrite enabled on the server?

Is AllowOveride set correctly to allow .htacess to change settings?

Share this post


Link to post
Share on other sites
I think I am using the exact same htaccess as what is posted on the forum, I have Ultimate SEO working fine with the htaccess so didnt see in the install that anything had to change... if it does then that definitely could be the problem :)

 

Options +FollowSymLinks

RewriteEngine On

RewriteBase /brownieseobase/

 

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

RewriteRule ^(.*)-c-(.*).html$ index.php?cPath=$2&%{QUERY_STRING}

RewriteRule ^(.*)-m-([0-9]+).html$ index.php?manufacturers_id=$2&%{QUERY_STRING}

RewriteRule ^(.*)-pi-([0-9]+).html$ popup_image.php?pID=$2&%{QUERY_STRING}

RewriteRule ^(.*)-t-([0-9]+).html$ articles.php?tPath=$2&%{QUERY_STRING}

RewriteRule ^(.*)-a-([0-9]+).html$ article_info.php?articles_id=$2&%{QUERY_STRING}

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

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

RewriteRule ^(.*)-i-([0-9]+).html$ information.php?info_id=$2&%{QUERY_STRING}

my rewritebase looks correct as it is set up on www.mydomain.com/brownieseobase/productname-p-123.html

So im guessing /brownieseobase/ is right.

Is it a linux server? (unix or linux, definitely not windows)

Is mod_rewrite enabled on the server? (must be to have Ultimate seo working)

Is AllowOveride set correctly to allow .htacess to change settings? (same as above)

 

I started with the original files again today (not a fresh osc just someone else was looking after the site before) I installed Ultimate SEO again, that works fine, then installed your contrib and it shows up in the admin no problem.... i turn it on and then when i click on any category or product it just hangs ... the SECOND i turn it off in the admin section which i have open in another window the original window thats hanging opens up :) weird!

 

I've just installed header tag controller and thats working fine aswell, but it did have trouble with Admin Access contribute that is pre-installed before i got my hands on it... do you think i need to include any files in admin access to get this working and if so what files?

And one other thing I'd like your professional opinion on. Doesn't google treat "-" as part of the file name and "_" as a seperate word?

 

So if we have

/gold-necklace-p-123.html

it would treat it all as one thing

 

but If i changed -p- to _p- it would be

/gold-necklace_p-123.html

then google would treat it as gold necklace and then another word p-123 which should be better SEO wise??

 

Hmmm odd, all validation effectively does is take the incoming url (if it has .html on the end)

 

Re-queries seo.class.php to see if the two match .. than lets it go if it does match or redirects if it doesn't.

 

There's nowhere for a loop to happen.

 

Doesn't google treat "-" as part of the file name and "_" as a seperate word?

 

Google picks up the keywords just fine as it is.

Edited by FWR Media

Share this post


Link to post
Share on other sites

Hello FWR,

I just install you ULTIMATE SEO Validation add on, on v2.2 RC1

Turn it on in admin => configuration.

 

But it looks like nothing change, I still can assess: -c-2.html like best-product-cat-c-2.html

No redirection is perform,

 

Any way to check where is the problem?

thanks

 

I use 2.1d Ultimate SEO URLs contribution, re-uploaded by you.

Edited by moda

Share this post


Link to post
Share on other sites

When redirected to errorpage.php it has errorpage.php as 200 <-- do you think this is a problem?
Google Junky

 

Sadly yes, the bots are not very good at this and it seems they see the 200.

 

What about the following . .

 

 

if ($fwr_notfound)
die(
header("HTTP/1.0 404 Not Found") .
include('errorpage.php'));

Share this post


Link to post
Share on other sites

hi there,

 

maybe some one has this prolem as i had:

 

if a customer is logged in and the site is ssl secured a never ending redirect happens, when the customer wants to get to a category or product..

 

i made some changes in the function "tep_validate_seo_urls" in catalog/includes/fuctions/general.php

 

i hope thats correct! however, it works on my site www.spreewald-praesente.de

 

just replace the function:

 

################################################
// fwrmedia.co.uk mod to check SEO link validity
function tep_validate_seo_urls() {
global $HTTP_GET_VARS;
$querystring = str_replace('?', '&', $_SERVER['REQUEST_URI']);
if (isset($HTTP_GET_VARS['products_id']))
$get_id_vars = str_replace(strstr($HTTP_GET_VARS['products_id'], '{'), '', $HTTP_GET_VARS['products_id']); // Remove attributes
$qs_parts = explode('&', $querystring); // explode the querystring into an array
$count = count($qs_parts);
$added_uri = array();
$remove_nasties = array('%3C', '%3E', '<', '>', ':/', 'http', 'HTTP', 'https', 'HTTPS'); // We do tep_sanitize_string() later anyway
for ( $i=0; $i<$count; $i++ ) { // We don't want to introduce vulnerability do we :)
switch($qs_parts[$i]) {
case(false !== strpos($qs_parts[$i], '.html')):
$core = urldecode($qs_parts[$i]); // Found the path
( (strstr($core, '{') !== false) ? ($core = str_replace(strstr($core, '{'), '', $core) . '.html') : NULL ); // Remove attributes
break;
case(false !== strpos($qs_parts[$i], 'osCsid')):
$seo_sid = $qs_parts[$i]; // Found the osCsid
break;
default:
$added_uri[] = ( urldecode(str_replace($remove_nasties, '', $qs_parts[$i])) ); // Found the additional querystring (e.g. &page=3&sort=2a from split_page_results)
}
}

// If -x- is in the querystring create var $querytype which is a string which explodes into an array on -
( strpos($_SERVER['REQUEST_URI'], '-p-') ? ($querytype = 'filename_product_info-products_id=' . $get_id_vars) :
( strpos($_SERVER['REQUEST_URI'], '-c-') ? ($querytype = 'filename_default-cPath=' . $HTTP_GET_VARS['cPath']) :
( strpos($_SERVER['REQUEST_URI'], '-m-') ? ($querytype = 'filename_default-manufacturers_id=' . $HTTP_GET_VARS['manufacturers_id']) :
( strpos($_SERVER['REQUEST_URI'], '-pi-') ? ($querytype = 'filename_popup_image-pID=' . $HTTP_GET_VARS['pID']) :
( strpos($_SERVER['REQUEST_URI'], '-t-') ? ($querytype = 'filename_articles-tPath=' . $HTTP_GET_VARS['tPath']) :
( strpos($_SERVER['REQUEST_URI'], '-a-') ? ($querytype = 'filename_article_info-articles_id=' . $HTTP_GET_VARS['articles_id']) :
( strpos($_SERVER['REQUEST_URI'], '-pr-') ? ($querytype = 'filename_product_reviews-products_id=' . $get_id_vars) :
( strpos($_SERVER['REQUEST_URI'], '-pri-') ? ($querytype = 'filename_product_reviews_info-products_id=' . $get_id_vars) :
( strpos($_SERVER['REQUEST_URI'], '-prw-') ? ($querytype = 'filename_product_reviews_write-products_id=' . $get_id_vars) :
( strpos($_SERVER['REQUEST_URI'], '-i-') ? ($querytype = 'filename_information-info_id=' . $HTTP_GET_VARS['info_id']) :
( strpos($_SERVER['REQUEST_URI'], '-links-') ? ($querytype = 'filename_links-lPath=' . $HTTP_GET_VARS['lPath']) :
false )))))))))) );

$validate_array = explode('-', $querytype); // Gives e.g. $validate_array[0] = filename_default, $validate_array[1] = products_id=xx
$linkreturned = tep_href_link(constant(strtoupper($validate_array[0])), $validate_array[1]); // Get a propper new SEO link
// Rebuild the extra querystring
( (strpos($linkreturned, '?') !== false) ? ($seperator = '&') : ($seperator = '?') ); // Is there an osCid on $linkreturned?
$count = count($added_uri); // Count the extra querystring items
for ($i=0; $i<$count; $i++)
if ($i == 0) $linkreturned = $linkreturned . $seperator . tep_sanitize_string($added_uri[$i]); //add the first using seperator ? or &
else $linkreturned = $linkreturned . '&' . tep_sanitize_string($added_uri[$i]); // Just add "&" this time
$linkreturnedstripped = str_replace( strstr($linkreturned, '?'), '', $linkreturned); // Strip osCsid to allow a match with $core
$linktest = str_replace(HTTP_SERVER . DIR_WS_HTTP_CATALOG, '', $linkreturned); // Pair the url down to the querystring
$linktest = str_replace(HTTPS_SERVER . DIR_WS_HTTPS_CATALOG, '', $linktest); // Pair the url down to the querystring
if (strpos($linktest, '-') === 0) { // If the link returned by seo.class.php has no text mysite.com/-c-xxx.html
$dohome = tep_href_link(FILENAME_DEFAULT); // It means that the page no longer exists (assuming the class is working)
header("HTTP/1.0 404 Not Found"); // Set header 404 Not Found
header("Location: $dohome"); // .. 404 redirect to index.php .. and never come back!!!
exit;
} else if (( HTTP_SERVER . $core != $linkreturnedstripped ) && ( HTTPS_SERVER . $core != $linkreturnedstripped )) { // Link looks bad so 301
$linkreturned = str_replace('&', '&', $linkreturned); // Just in case those sneaky W3C urls tried to throw in an &
header("HTTP/1.0 301 Moved Permanently"); // redirect to the good version
header("Location: $linkreturned"); // 301 redirect
exit;
}
}
################################################
// END fwrmedia.co.uk mod to check SEO link validity

Share this post


Link to post
Share on other sites
hi there,

 

maybe some one has this prolem as i had:

 

if a customer is logged in and the site is ssl secured a never ending redirect happens, when the customer wants to get to a category or product..

 

i made some changes in the function "tep_validate_seo_urls" in catalog/includes/fuctions/general.php

 

i hope thats correct! however, it works on my site www.spreewald-praesente.de

 

just replace the function:

 

################################################
// fwrmedia.co.uk mod to check SEO link validity
function tep_validate_seo_urls() {
global $HTTP_GET_VARS;
$querystring = str_replace('?', '&', $_SERVER['REQUEST_URI']);
if (isset($HTTP_GET_VARS['products_id']))
$get_id_vars = str_replace(strstr($HTTP_GET_VARS['products_id'], '{'), '', $HTTP_GET_VARS['products_id']); // Remove attributes
$qs_parts = explode('&', $querystring); // explode the querystring into an array
$count = count($qs_parts);
$added_uri = array();
$remove_nasties = array('%3C', '%3E', '<', '>', ':/', 'http', 'HTTP', 'https', 'HTTPS'); // We do tep_sanitize_string() later anyway
for ( $i=0; $i<$count; $i++ ) { // We don't want to introduce vulnerability do we :)
switch($qs_parts[$i]) {
case(false !== strpos($qs_parts[$i], '.html')):
$core = urldecode($qs_parts[$i]); // Found the path
( (strstr($core, '{') !== false) ? ($core = str_replace(strstr($core, '{'), '', $core) . '.html') : NULL ); // Remove attributes
break;
case(false !== strpos($qs_parts[$i], 'osCsid')):
$seo_sid = $qs_parts[$i]; // Found the osCsid
break;
default:
$added_uri[] = ( urldecode(str_replace($remove_nasties, '', $qs_parts[$i])) ); // Found the additional querystring (e.g. &page=3&sort=2a from split_page_results)
}
}

// If -x- is in the querystring create var $querytype which is a string which explodes into an array on -
( strpos($_SERVER['REQUEST_URI'], '-p-') ? ($querytype = 'filename_product_info-products_id=' . $get_id_vars) :
( strpos($_SERVER['REQUEST_URI'], '-c-') ? ($querytype = 'filename_default-cPath=' . $HTTP_GET_VARS['cPath']) :
( strpos($_SERVER['REQUEST_URI'], '-m-') ? ($querytype = 'filename_default-manufacturers_id=' . $HTTP_GET_VARS['manufacturers_id']) :
( strpos($_SERVER['REQUEST_URI'], '-pi-') ? ($querytype = 'filename_popup_image-pID=' . $HTTP_GET_VARS['pID']) :
( strpos($_SERVER['REQUEST_URI'], '-t-') ? ($querytype = 'filename_articles-tPath=' . $HTTP_GET_VARS['tPath']) :
( strpos($_SERVER['REQUEST_URI'], '-a-') ? ($querytype = 'filename_article_info-articles_id=' . $HTTP_GET_VARS['articles_id']) :
( strpos($_SERVER['REQUEST_URI'], '-pr-') ? ($querytype = 'filename_product_reviews-products_id=' . $get_id_vars) :
( strpos($_SERVER['REQUEST_URI'], '-pri-') ? ($querytype = 'filename_product_reviews_info-products_id=' . $get_id_vars) :
( strpos($_SERVER['REQUEST_URI'], '-prw-') ? ($querytype = 'filename_product_reviews_write-products_id=' . $get_id_vars) :
( strpos($_SERVER['REQUEST_URI'], '-i-') ? ($querytype = 'filename_information-info_id=' . $HTTP_GET_VARS['info_id']) :
( strpos($_SERVER['REQUEST_URI'], '-links-') ? ($querytype = 'filename_links-lPath=' . $HTTP_GET_VARS['lPath']) :
false )))))))))) );

$validate_array = explode('-', $querytype); // Gives e.g. $validate_array[0] = filename_default, $validate_array[1] = products_id=xx
$linkreturned = tep_href_link(constant(strtoupper($validate_array[0])), $validate_array[1]); // Get a propper new SEO link
// Rebuild the extra querystring
( (strpos($linkreturned, '?') !== false) ? ($seperator = '&') : ($seperator = '?') ); // Is there an osCid on $linkreturned?
$count = count($added_uri); // Count the extra querystring items
for ($i=0; $i<$count; $i++)
if ($i == 0) $linkreturned = $linkreturned . $seperator . tep_sanitize_string($added_uri[$i]); //add the first using seperator ? or &
else $linkreturned = $linkreturned . '&' . tep_sanitize_string($added_uri[$i]); // Just add "&" this time
$linkreturnedstripped = str_replace( strstr($linkreturned, '?'), '', $linkreturned); // Strip osCsid to allow a match with $core
$linktest = str_replace(HTTP_SERVER . DIR_WS_HTTP_CATALOG, '', $linkreturned); // Pair the url down to the querystring
$linktest = str_replace(HTTPS_SERVER . DIR_WS_HTTPS_CATALOG, '', $linktest); // Pair the url down to the querystring
if (strpos($linktest, '-') === 0) { // If the link returned by seo.class.php has no text mysite.com/-c-xxx.html
$dohome = tep_href_link(FILENAME_DEFAULT); // It means that the page no longer exists (assuming the class is working)
header("HTTP/1.0 404 Not Found"); // Set header 404 Not Found
header("Location: $dohome"); // .. 404 redirect to index.php .. and never come back!!!
exit;
} else if (( HTTP_SERVER . $core != $linkreturnedstripped ) && ( HTTPS_SERVER . $core != $linkreturnedstripped )) { // Link looks bad so 301
$linkreturned = str_replace('&', '&', $linkreturned); // Just in case those sneaky W3C urls tried to throw in an &
header("HTTP/1.0 301 Moved Permanently"); // redirect to the good version
header("Location: $linkreturned"); // 301 redirect
exit;
}
}
################################################
// END fwrmedia.co.uk mod to check SEO link validity

 

That code can't be used because it has converted some characters via posting .. but the concept will work .. e.g. changing HTTP to HTTPS.

 

I never included the feature to check for SSL because a site should never be all SSL.

Share this post


Link to post
Share on other sites
That code can't be used because it has converted some characters via posting .. but the concept will work .. e.g. changing HTTP to HTTPS.

 

I never included the feature to check for SSL because a site should never be all SSL.

 

hi thanks for your reply!

 

which characters were converted?

 

when a customer has logged in the whole site is SSL because some security massages like "are you sure to switch from https to http?" or "some things are not downloaded via ssl, are you sure to proceed?"

 

this messages lets the customer think the site is not secure and some customers even cancel their order...

 

so the site is still sll secured after customers checkout. and if the customer wants to show a category or product the "never ending redirect" error massage is shown. for that reason it´s nessecary to work at ssl secured sites

Share this post


Link to post
Share on other sites
hi thanks for your reply!

 

which characters were converted?

 

when a customer has logged in the whole site is SSL because some security massages like "are you sure to switch from https to http?" or "some things are not downloaded via ssl, are you sure to proceed?"

 

this messages lets the customer think the site is not secure and some customers even cancel their order...

 

so the site is still sll secured after customers checkout. and if the customer wants to show a category or product the "never ending redirect" error massage is shown. for that reason it´s nessecary to work at ssl secured sites

 

That just means the site is not set up correctly, my sites receive no such customer notices.

Share this post


Link to post
Share on other sites
That just means the site is not set up correctly, my sites receive no such customer notices.

 

i think its a browser (and his setup) issue. in the browser you can set up that you don´t want to get those messages. but you can´t suppose, that the customer has set up his browser in this way.

 

e.g in IE you get a heavy security warning (white page with warning to proceed) if a https secured site has parts in it, which are loaded via http. and this is the OSC´s normal way, how e.g. pictures are loaded although the site is loaded by https.

 

greetings

 

albossum

Share this post


Link to post
Share on other sites

albossum,

 

I'm assuming you asked permission from FWR Media to add something to the contribution page?

FWR Media wrote: "Please do not add packages here or I will cease support". That is the message on the contribution page that you seemed to have missed.

 

Your inability to set up your site correctly doesn't mean that you should change code and add contributions. The contribution already works the way it was intended to work. Your new addition needs to be taken off of the page before a newcomer has the mishap of believing it is actually needed.

 

No person in their right mind would have customers browse a whole site in https.

 

 

FWR Media and myself are not forum buddies nor does it matter to me whether we ever would be. All I know is that this would irritate to hell out of me if someone touched code that was already perfect the way it was and someone took it upon themselves to screw it up.

 

Thanks,

Google Junky

Share this post


Link to post
Share on other sites

my site url is

 

http://shaze.in/catalog/index.php

 

what would be the .htaccess file for this site.

I am not able to write .htaccess file for this site.

 

my current htaccess file contant is:

------------------------------------------------

# $Id: .htaccess 1739 2007-12-20 00:52:16Z hpdl $

#

# 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

php_value session.auto_start 0


When I was born, I was cryed and everyone around me was smiling.

Live our life so at the end,

I am the one who is smiling and everyone around me is crying.

Share this post


Link to post
Share on other sites
my site url is

 

http://shaze.in/catalog/index.php

 

what would be the .htaccess file for this site.

I am not able to write .htaccess file for this site.

 

my current htaccess file contant is:

------------------------------------------------

# $Id: .htaccess 1739 2007-12-20 00:52:16Z hpdl $

#

# 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

php_value session.auto_start 0

 

Please stop double posting Prafulkr

 

This is not applicable to this support thread and you have posted enough on the other.

Share this post


Link to post
Share on other sites

Version 1.0.3 added to contributions

 

Changelog:

 

Added code to ignore .html files if not ULTIMATE SEO LINKS. Thanks JavaRoasters.

 

Added code to detect if an SSL catalog.

 

404 then redirect did not function as required. Google seems to record the 302 from the redirect.

 

Validator now dies with a 404 message and a link to return to the shop.

 

HTML for this is in function four_o_four_die().

 

UPDATING: catalog/includes/functions/general.php

 

Just replace function tep_validate_seo_urls() and ensure to include the new function four_o_four_die().

 

I say again if others add packages to this contribution I will cease to support and update.

Edited by FWR Media

Share this post


Link to post
Share on other sites

Hello,

 

I am new here.

I am using this nice contibution.

 

I made the last version redirect the 404 to my custom 404 page ( set in .htacces ).

But when i am in my 404 page the header is 200.

I looked to the 404 page that is used in the contribution and here is the header 302 using HEAD-request ( and 200 using GET-request )

 

Is it possible to set the header from my 404 page to a real 404?

I check the headers in Opera DOMtools

Her is my custom 404 page: http://www.multistock.be/notfound.html

 

Regards, Steven Vandenbussche

Share this post


Link to post
Share on other sites

B)--><div class='quotetop'>QUOTE(Steven B @ Apr 5 2008, 11:08 PM) <{POST_SNAPBACK}></div><div class='quotemain'><!--quotec-->Hello,

 

I am new here.

I am using this nice contibution.

 

I made the last version redirect the 404 to my custom 404 page ( set in .htacces ).

But when i am in my 404 page the header is 200.

I looked to the 404 page that is used in the contribution and here is the header 302 using HEAD-request ( and 200 using GET-request )

 

Is it possible to set the header from my 404 page to a real 404?

I check the headers in Opera DOMtools

Her is my custom 404 page: http://www.multistock.be/notfound.html

 

Regards, Steven Vandenbussche

 

I'm not understanding why you wouldn't get a 404 with the new system .. the following is the result on my local server. .

 

http://localhost/freshrc2/dvd-movies-c-999...0cg37k9m6k6rb75

 

GET /freshrc2/dvd-movies-c-999.html?osCsid=fcrhtov0tq80cg37k9m6k6rb75 HTTP/1.1

Host: localhost

User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.13) Gecko/20080311 Firefox/2.0.0.13

Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5

Accept-Language: en,en-us;q=0.5

Accept-Encoding: gzip,deflate

Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7

Keep-Alive: 300

Connection: keep-alive

 

HTTP/1.x 404 Not Found

Date: Sat, 05 Apr 2008 22:21:31 GMT

Server: Apache/2.0.59 (Win32) PHP/5.2.1

X-Powered-By: PHP/5.2.1

Expires: Thu, 19 Nov 1981 08:52:00 GMT

Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0

Pragma: no-cache

Content-Length: 549

Connection: close

Content-Type: text/html

----------------------------------------------------------

 

I also replied to your personal email and gave you a link to a place where I have wriiten the specific code for you to use your own 404 page.

Edited by FWR Media

Share this post


Link to post
Share on other sites

Sorry Robert,

 

I thougt you meant this forum...

Anyway, these are my headers, that looks not competely OK i think?

 

http://www.multistock.be/mooie-tiffany-hang-lamp-herfst-p-3791.html

 

GET /mooie-tiffany-hang-lamp-herfst-p-3791.html HTTP/1.1

Host: www.multistock.be

User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; nl; rv:1.8.1.13) Gecko/20080311 Firefox/2.0.0.13

Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5

Accept-Language: nl,en-us;q=0.7,en;q=0.3

Accept-Encoding: gzip,deflate

Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7

Keep-Alive: 300

Connection: keep-alive

 

HTTP/1.x 200 OK

Date: Sat, 05 Apr 2008 23:10:41 GMT

Server: NOYB

X-Powered-By: PHP/5.2.5

Set-Cookie: cookie_test=please_accept_for_session; expires=Mon, 05-May-2008 23:10:41 GMT; path=/; domain=www.multistock.be

Connection: close

Transfer-Encoding: chunked

Content-Type: text/html; charset=ISO-8859-1

----------------------------------------------------------

http://www.multistock.be/(EmptyReference!)

 

GET /(EmptyReference!) HTTP/1.1

Host: www.multistock.be

User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; nl; rv:1.8.1.13) Gecko/20080311 Firefox/2.0.0.13

Accept: image/png,*/*;q=0.5

Accept-Language: nl,en-us;q=0.7,en;q=0.3

Accept-Encoding: gzip,deflate

Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7

Keep-Alive: 300

Connection: keep-alive

Referer: http://www.multistock.be/mooie-tiffany-han...fst-p-3791.html

Cookie: cookie_test=please_accept_for_session

 

HTTP/1.x 404 Not Found

Date: Sat, 05 Apr 2008 23:10:41 GMT

Server: NOYB

Last-Modified: Tue, 25 Mar 2008 19:23:31 GMT

Etag: "df8006-35bf-e34072c0"

Accept-Ranges: bytes

Content-Length: 13759

Connection: close

Content-Type: text/html; charset=ISO-8859-1

----------------------------------------------------------

Share this post


Link to post
Share on other sites

B)-->

QUOTE(Steven B @ Apr 6 2008, 12:32 AM) <{POST_SNAPBACK}>
Sorry Robert,

 

I thougt you meant this forum...

Anyway, these are my headers, that looks not competely OK i think?

 

http://www.multistock.be/mooie-tiffany-hang-lamp-herfst-p-3791.html

 

GET /mooie-tiffany-hang-lamp-herfst-p-3791.html HTTP/1.1

Host: www.multistock.be

User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; nl; rv:1.8.1.13) Gecko/20080311 Firefox/2.0.0.13

Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5

Accept-Language: nl,en-us;q=0.7,en;q=0.3

Accept-Encoding: gzip,deflate

Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7

Keep-Alive: 300

Connection: keep-alive

 

HTTP/1.x 200 OK

Date: Sat, 05 Apr 2008 23:10:41 GMT

Server: NOYB

X-Powered-By: PHP/5.2.5

Set-Cookie: cookie_test=please_accept_for_session; expires=Mon, 05-May-2008 23:10:41 GMT; path=/; domain=www.multistock.be

Connection: close

Transfer-Encoding: chunked

Content-Type: text/html; charset=ISO-8859-1

----------------------------------------------------------

http://www.multistock.be/(EmptyReference!)

 

GET /(EmptyReference!) HTTP/1.1

Host: www.multistock.be

User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; nl; rv:1.8.1.13) Gecko/20080311 Firefox/2.0.0.13

Accept: image/png,*/*;q=0.5

Accept-Language: nl,en-us;q=0.7,en;q=0.3

Accept-Encoding: gzip,deflate

Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7

Keep-Alive: 300

Connection: keep-alive

Referer: http://www.multistock.be/mooie-tiffany-han...fst-p-3791.html

Cookie: cookie_test=please_accept_for_session

 

HTTP/1.x 404 Not Found

Date: Sat, 05 Apr 2008 23:10:41 GMT

Server: NOYB

Last-Modified: Tue, 25 Mar 2008 19:23:31 GMT

Etag: "df8006-35bf-e34072c0"

Accept-Ranges: bytes

Content-Length: 13759

Connection: close

Content-Type: text/html; charset=ISO-8859-1

----------------------------------------------------------

 

Just tried the link you mention it works fine.

Share this post


Link to post
Share on other sites
Just tried the link you mention it works fine.

 

I have changed the code to your original code, that's why it works fine right now...

Share this post


Link to post
Share on other sites

B)-->

QUOTE(Steven B @ Apr 6 2008, 08:49 AM) <{POST_SNAPBACK}>
I have changed the code to your original code, that's why it works fine right now...

 

Ok I'm misunderstanding obviously .. what exactly do you do for it NOT to work?

Share this post


Link to post
Share on other sites

die( include('MY404MESSAGE.php') ); // Product/category does not exist so die here with a 404

 

Here, with my own 404errorpage, i had the headers i sent earlyer.

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
Sign in to follow this  

×