Advertisement:

Author Topic: SEO important for deleted categories PERMALINKS  (Read 1501 times)

Manino

  • Newbie
  • *
  • Posts: 19
  • Sonnbergwindkraft
SEO important for deleted categories PERMALINKS
« on: October 12, 2012, 02:40:41 pm »
Hi,

I think the following should be added to search.php in class CWebSearch.

I just compare the entries, but better would be to really check the main and subcategories if they exist.

Google and CO once indexd the pages, they will always index it and have the problem with double title and so on.

    class CWebSearch extends BaseModel
    {
        var $mSearch;
        var $nice_url;
        var $uri;

        function __construct()
        {

          $conn2 = getConnection();
         
          $urll = $_SERVER["REQUEST_URI"];
          $vars = explode("/",$urll);

           $main_cat = $vars[1]; // the user id of the user profile we're at
           $sub_cat = $vars[2]; // the user id of the user profile we're at
           
           $result_main_sub=$conn2->osc_dbFetchResult("SELECT s_name FROM oc_t_category_description WHERE s_name = '$main_cat' OR s_name = '$sub_cat'");

          if($result_main_sub>0) {
                 
          }else{
           $this->do404() ;
          return ;           
          }
         
            parent::__construct() ;

Now google has a 404 Code for all the silly pages which does not exist.

Permalinks activated

kind regards

Manuel

_CONEJO

  • Administrator
  • Hero Member
  • *****
  • Posts: 4689
Re: SEO important for deleted categories PERMALINKS
« Reply #1 on: October 31, 2012, 12:13:58 pm »
Hi Manino,

I don't really understand your problem, could you explain a little more?
Are you using the sitemap plugin?
Thanks

frosticek

  • Hero Member
  • *****
  • Posts: 3948
Re: SEO important for deleted categories PERMALINKS
« Reply #2 on: November 08, 2012, 09:22:30 am »
I think he redirect you to 404 page if ad was deleted, but I think you should be redirected to search page defautly. It is quite important because google will report you broken links. It could be useful with facebook login plugin, where you can get:
Code: [Select]
Fatal error: Call to a member function getUser() on a non-object in...Maybe this could help.