Results 1 to 7 of 7

Thread: google index question

  1. #1
    Join Date
    Aug 2010

    Cool google index question

    i have a website that is in essence one page that gets its content depending what is in the query string... Eg. ?page=home. Using apache rewrite rule i have the pages 'site.com/home' rewritte to 'site.com?page=home' which gets its content from text files.... My question is will google index: the text files, the pages with the query string, and the pages with the fake directories... I only wish for the last 1 to be true
    Last edited by brian8765; 06-09-2011 at 10:30 AM.

  2. #2
    Join Date
    Jun 2008
    Get rid of the ?

    Google hates query strings.

    Use QSA (Query String Appends)

    Use this for your .htaccess file:

    Options +FollowSymLinks -Indexes
    RewriteEngine On 
        RewriteRule ^page,search$ index.php?page=search [L]
        RewriteRule ^info,(.*)?$ index.php?info=$1 [L]
        RewriteCond %{REQUEST_FILENAME} !-d 
        RewriteCond %{REQUEST_FILENAME} !-f 
        RewriteRule ^(.*)$ /index.php?$1 [QSA,L]

    Privacy Policy Generator

  3. #3
    Join Date
    Dec 2005
    You really missed the mark there, Donatello, that wasn't the OP's question.

    To the OP, if you only wish for search engines to index the one like site.com/home then you must be sure that that is the only link available to that page on your site.

    For instance, if you go out and litter blog posts, forums, and other places on the web with site.com/?page=home, then google will see that link, follow it and index the content. If you instead make sure that anybody linking to you uses site.com/home, then that's the only one google will see.

    Google will never index the text files if there are no direct links to them. This will hopefully provide you a clue that google's search engine only has results that have links to them. If I put a site up online and turned it into an island, without any incoming or outgoing links then, from my understanding of it, google would never index it because it would never know about it.

    Hope that answer is sufficient.
    I've switched careers...
    I'm NO LONGER a scientist,
    but now a web developer...

  4. #4
    Join Date
    Aug 2010
    thank you for clearing that up aj... Also for donetello here is the code i will use for my htaccess
    RewriteRule ^([a-zA-Z0-9]+)/?$ /?page=$1
    . Is it possible to create a rewrite condition to test if the page exist and to redirect otherwise?

  5. #5
    Join Date
    Jun 2008


    Quote Originally Posted by aj_nsc View Post
    You really missed the mark there, Donatello, that wasn't the OP's question.
    Hehe... Well, I usually frequent these forums before bedtime when my horsepower is winding down... I saw that ? In the query string and snapped at the bait!

    Good answer, but still... Kill the question mark that betrays your URL as a generated page based upon a query!

    Privacy Policy Generator

  6. #6
    Join Date
    Jun 2008


    Quote Originally Posted by brian8765 View Post
    thank you for clearing that up aj... Also for donetello here is the code i will use for my htaccess
    RewriteRule ^([a-zA-Z0-9]+)/?$ /?page=$1
    . Is it possible to create a rewrite condition to test if the page exist and to redirect otherwise?
    Just make a 404 page that is identical to your homepage and that will properly handle a query string.

    I did that here:

    No matter what you enter, you will never ever get a "Page Does Not Exis!"... But instead a copy of the homepage that rather than encourage a searcher to hit the back button, entices them with the homepage content as well as the main menu. Try it by adding any nonsense to the url ...

    You can take this a bit further by making your 404 page handle queries usingQSA as I inappropriately answered you (Jumped the gun) in my first post.

    Hope this helps!

    Privacy Policy Generator

  7. #7
    Join Date
    Jun 2008
    One last example of QSA...

    Look here...

    Whatever you add to the end of the url gets generated.
    For example...

    Anything that exists in the Zazzle catalog gets generated without a visible query string. You can even type a space in the URL. Try it!

    If you do that with your 404 page, users will never go away without seeng some content, and nobody ever gets a 404 - a glorified full page back-button!
    Last edited by donatello; 06-12-2011 at 05:01 AM. Reason: Broken URLs, spelling, iPad goofs...

    Privacy Policy Generator

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center



X vBulletin 4.2.2 Debug Information

  • Page Generation 0.09584 seconds
  • Memory Usage 2,916KB
  • Queries Executed 15 (?)
More Information
Template Usage (34):
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_global_above_footer
  • (1)ad_global_below_navbar
  • (1)ad_global_header1
  • (1)ad_global_header2
  • (1)ad_navbar_below
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (1)ad_thread_first_post_content
  • (1)ad_thread_last_post_content
  • (3)bbcode_code
  • (2)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)headinclude_bottom
  • (7)memberaction_dropdown
  • (1)navbar
  • (4)navbar_link
  • (1)navbar_moderation
  • (1)navbar_noticebit
  • (1)navbar_tabs
  • (2)option
  • (7)postbit
  • (7)postbit_onlinestatus
  • (7)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available (6):
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files (26):
  • ./showthread.php
  • ./global.php
  • ./includes/class_bootstrap.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/functions_navigation.php
  • ./includes/class_friendly_url.php
  • ./includes/class_hook.php
  • ./includes/class_bootstrap_framework.php
  • ./vb/vb.php
  • ./vb/phrase.php
  • ./includes/functions_facebook.php
  • ./includes/functions_calendar.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_notice.php
  • ./packages/vbattach/attach.php
  • ./vb/types.php
  • ./vb/cache.php
  • ./vb/cache/db.php
  • ./vb/cache/observer/db.php
  • ./vb/cache/observer.php 

Hooks Called (73):
  • init_startup
  • friendlyurl_resolve_class
  • init_startup_session_setup_start
  • database_pre_fetch_array
  • database_post_fetch_array
  • init_startup_session_setup_complete
  • global_bootstrap_init_start
  • global_bootstrap_init_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • load_show_variables
  • load_forum_show_variables
  • global_state_check
  • global_bootstrap_complete
  • global_start
  • style_fetch
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • strip_bbcode
  • friendlyurl_clean_fragment
  • friendlyurl_geturl
  • forumjump
  • cache_templates
  • cache_templates_process
  • template_register_var
  • template_render_output
  • fetch_template_start
  • fetch_template_complete
  • parse_templates
  • fetch_musername
  • notices_check_start
  • notices_noticebit
  • process_templates_complete
  • friendlyurl_redirect_canonical
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • memberaction_dropdown
  • tag_fetchbit
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • build_navigation_data
  • build_navigation_array
  • check_navigation_permission
  • process_navigation_links_start
  • process_navigation_links_complete
  • set_navigation_menu_element
  • build_navigation_menudata
  • build_navigation_listdata
  • build_navigation_list
  • set_navigation_tab_main
  • set_navigation_tab_fallback
  • navigation_tab_complete
  • fb_like_button
  • showthread_complete
  • page_templates