Jump to content
Chrisj

help with not showing php/html page in web search

Recommended Posts

The php web video script that I'm using displays user/member account pages in google searches.

For example, the url displaying the page is the https://webvideosite.com/@chrisj

I'm looking for guidance/suggestions on how to have the user/member account pages not appear in searches, either by blocking that somehow,

or only having access to it if you are logged into the site.

I look forward to any replies

Share this post


Link to post
Share on other sites

Is this page under your control, ie, did you write it or are you hosting it on your own account?  If so you can modify how it works.  Perhaps to use a POST method instead of a GET method and add a form to it to get the search argument.

Share this post


Link to post
Share on other sites
Posted (edited)

Are you just trying to hack us while we are responding to your fake query for help?  I just tried that example url of yours.  It's written in Chinese!  Normally I refuse to click on these kinds of things.  For some ungodly reason I went against my better sense and exposed myself to your game.

What a jerk!

Edited by ginerjm

Share this post


Link to post
Share on other sites

thanks for your replies.

Regarding the url, I said "For example..."

it was there as an example

Share this post


Link to post
Share on other sites

as an example of what exactly?  You weren't trying to show us your own work?   How silly to post it then!  We DO know what a GET query looks like.

Share this post


Link to post
Share on other sites

Screen shots of what is happening maybe Chris?

Back in the day you could ask Google and other search engines not to spider a site or certain parts of it.  I don't know if that still works.  Search for help on how to use robots.txt

Share this post


Link to post
Share on other sites

Thanks for the replies.

Yes, noindex.

I had asked the web script author about this he replied:

"You can place it in ./themes/layout/container.html 
you will need to use php code in order to load this meta only for profile page".

 

I see the container.html <head> section and I believe the profile page is located at: /themes/default/layout/timeline/pages/about.html

I just don't know how to put it altogether with this:

     <?php 
     <meta name=”robots” content=”noindex”>
     ?>

 

and additional guidance is appreciated

 

 

 

Share this post


Link to post
Share on other sites
Posted (edited)

What you are showing us is an attempt load a line of html code as php code.   What was suggested was that you use php to determine when to add the html line.  Something like:

(in php mode) 

if $pagename == 'profilerpagename.php' 

      echo "<meta name="tobots" content="noindex">";

These lines need to be added near where your head section is being out and of course only in the profiler page's coding.

Edited by ginerjm
fix the if

Share this post


Link to post
Share on other sites

Thanks for your reply.

The developer provided this:

$pt->second_page == ‘about’

based on the rest of the container.html code, I have added this:

    <?php if ($pt->second_page == about’){ ?>
    <meta name="robots" content="noindex">} />
    <?php } ?>

does this code look valid?

If so, how would I test?

Share this post


Link to post
Share on other sites

How about:

 <?php

if ($pt->second_page == about’)
    echo "<meta name='robots' content='noindex'>'";

Assuming that you place this code in the correct script and in the correct place.
 

Share this post


Link to post
Share on other sites
Posted (edited)

Thanks again for your reply/help.

 

does this line have an extra ' in it, before the last "   ?

echo "<meta name='robots' content='noindex'>'";

if not, and this is valid code:

  <?php
    if ($pt->second_page == about’)
    echo "<meta name='robots' content='noindex'>'";
    ?>

how can I test to see if it successfully facilitates the user/member account pages not appearing in searches?

I look forward to any assistance.

Edited by Chrisj

Share this post


Link to post
Share on other sites
8 hours ago, Chrisj said:

does this line have an extra ' in it, before the last "   ?


echo "<meta name='robots' content='noindex'>'";
                                            ^

 

Yes, it does. I can see it quite clearly (indicated by ^ ).

But it shouldn't have.

Share this post


Link to post
Share on other sites

Oops - my bad. Sorry for the confusion.

Share this post


Link to post
Share on other sites

Thanks for all the replies/help.

 

how can I test to see if it successfully facilitates the user/member account pages not appearing in searches?

Share this post


Link to post
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
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  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...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.