Fixing Squirrelcart Godaddy SEO Friendly URL’s

Wanted to show below a quick fix for godaddy shared hosting squirrelcart seo friendly url fix.

Step 1
Htaccess –

Options -MultiViews
RewriteEngine On
RewriteRule ^/(products|categories|content|news|reviews|testimonials|contact)/?(.*)$ index.php/$1/$2 [L]

Step 2
rename php.ini in ftp to php5.ini

Step 3
Add to php5.ini in last line

cgi.fix_pathinfo = 1

Step 4
Test seo friendly url’s at
https://[DOMAIN]/squirrelcart/diag_seo_urls.php/this/is/a/test?t=1

* Don’t forget to switch [DOMAIN]

Simple Password Protect Category Pages

Using htaccess, godaddy, php, cgi fix, $_SERVER[‘PHP_AUTH_USER’], $_SERVER[‘PHP_AUTH_PW’]

Fixes:
godaddy login keeps on popping up (popup) due to cgi mode.

Works on Specific Categories


See code fix:

1. PHP FILE


$pageurl=$_SERVER[REQUEST_URI];

if(($pageurl=='/categories/x')||($pageurl=='/categories/y')){

if(isset($_SERVER['HTTP_AUTHORIZATION'])) {
$auth_params = explode(":" , base64_decode(substr($_SERVER['HTTP_AUTHORIZATION'], 6)));
$_SERVER['PHP_AUTH_USER'] = $auth_params[0];
unset($auth_params[0]);
$_SERVER['PHP_AUTH_PW'] = implode('',$auth_params);
}

if (!isset($_SERVER['PHP_AUTH_USER'])) {
header("WWW-Authenticate: Basic realm="Private Area"");
header("HTTP/1.0 401 Unauthorized");
print "Sorry - you need valid credentials to be granted access! Try again by refreshing this page. Refresh Pagen";
exit;
} else {
if (($_SERVER['PHP_AUTH_USER'] == 'username') && ($_SERVER['PHP_AUTH_PW'] == 'password')) {

} else {
header("WWW-Authenticate: Basic realm="Private Area2"");
header("HTTP/1.0 401 Unauthorized");
print "Sorry - you need valid credentials to be granted access! Try again by refreshing this page. Refresh Pagen";
exit;
}
}
}

2. HTACCESS (linux)


RewriteCond %{HTTP:Authorization} ^(.*)
RewriteRule ^(.*) - [E=HTTP_AUTHORIZATION:%1]

Great ideas for gaining authority links

  • chamber of commerce
  • trade organizations
  • local news sites (i.e. latimes.com, ocregister.com)
  • local university pages (discounts, resource pages)
  • donations (local or nationwide businesses, non-profits, etc)
  • radio and news stations (also try npr for a story)
  • interview authority in niche (or write an article that mentions authority plus mention this to them)
  • certification listings
  • conferences
  • city websites (losangeles.com)
  • EDU