WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] [Plugin: Aleph] Strange SEO effect... (6 posts)

  1. Chris Andersen
    Member
    Posted 5 years ago #

    Hi Detective,
    sorry that I have to come up with a 3rd question at the same time... it's important:
    We had this link before:
    http://www.c-salsa.com/index.php?pagename=author-profile&profile_of=username

    Actually I don't see this page any more thru users.php or profile.php and that is good.
    Problem: Google crawled it and it is in the Google index.
    What can I do about that? The best would be that I could edit this site... but where do I find it?

  2. Detective
    Member
    Posted 5 years ago #

    Currently there is no option to disable that url, so you should disable it manually in the code.

    I don't have clear if you want to disable profiles or if you want to disable just those "ugly" urls. If you want the latter, it's impossible.

    To disable profiles go to Aleph.php in the folder base-classes and find this:

    function setupQueryVars($qvars){
    		$qvars[] = 'profile_of';
    		$qvars[] = 'profile';
    		$qvars[] = 'user_view';
    
    		foreach ($this->taxonomies as $taxonomy) {
    			$aleph_qvars = $taxonomy->getQueryVars();
    			if ($aleph_qvars !== false)
    				foreach ($aleph_qvars as $aqvar)
    					$qvars[] = $aqvar;
    		}
    		return $qvars;
    	}

    Now, replace it with:

    function setupQueryVars($qvars){
    		//$qvars[] = 'profile_of';
    		//$qvars[] = 'profile';
    		$qvars[] = 'user_view';
    
    		foreach ($this->taxonomies as $taxonomy) {
    			$aleph_qvars = $taxonomy->getQueryVars();
    			if ($aleph_qvars !== false)
    				foreach ($aleph_qvars as $aqvar)
    					$qvars[] = $aqvar;
    		}
    		return $qvars;
    	}

    Now in UserQuery.php, in the same folder, find:

    function setup_template() {
    		if (!$this->is_404 && $this->is_profile){

    Replace it with:

    function setup_template() {
    		if (0 && !$this->is_404 && $this->is_profile){

    I think that should trigger a 404 error on those urls.

  3. Chris Andersen
    Member
    Posted 5 years ago #

    Sorry, I was probably not clear enough.

    I neither want to disable profiles nor ugly urls. The ugly urls are not my problem at the moment.

    At the moment I have three different urls in the Aleph project:
    1. users.php = http://www.c-salsa.com/searching/people/
    2. profile.php = http://www.c-salsa.com/people/admin/
    3. http://www.c-salsa.com/index.php?pagename=author-profile&profile_of=username

    No. 3 was found and indexed by Google. If you click on the 3rd link you see that it was not supposed to be found and indexed.

    Question:
    What can I do? I don't want Google to show this green page in the search results.

    Hope it is clearer now.

  4. Detective
    Member
    Posted 5 years ago #

    As the user doesn't exists, it should print the 404 Error page, but it seems it doesn't, so it's my fault. You have found a bug in the plugin, i'll try to fix it.

    :'(

  5. Chris Andersen
    Member
    Posted 5 years ago #

    Just let me know.
    thx so much

  6. vincepettit
    Member
    Posted 5 years ago #

    As a quick fix you could add something to the robots.txt to tell google not to index that URL

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags