www.webdeveloper.com
Results 1 to 5 of 5

Thread: How to Create dummy directory for SEO ranking

Hybrid View

  1. #1
    Join Date
    Aug 2012
    Posts
    2

    How to Create dummy directory for SEO ranking

    Hi - I am a travel photographer as well as a php/mysql web developer. I have a number of images with Getty, and was interested to see that when displaying one of my images, they use a directory name based on the image title, then the image id number in the web URL, presumably for SEO ranking purposes.

    URL example:

    http://www.gettyimages.com/detail/ph...aphy/148624493

    They obviously don't have a separate directory for each of their milllions of images, so I assume the middle named directory is a dummy, created on the fly, and bypassed on the fly when the viewer wants to see the '148624493' image.

    My question: how is this done, and could I do something similar on my own php/mysql site? Any tips, hints, guides or links to descriptions or tutorials will be much appreciated. I have done a lot of searching but come up with nothing useful so far.

    Regards, Tim Makins, currently travelling in Laos.
    http://www.gnomeplanet.com/gallery.php

  2. #2
    Join Date
    Jan 2006
    Location
    MN
    Posts
    440
    You can do those things with .htaccess and php code in the page. The "directory" is really a variable for the image title, and the number of course is the image number. .htaccess can parse the long directory name to a variable such as;

    http://www.mypage.com/a-long-title-goes-here/12345678 becomes

    http://www.mypage.com/?title=a-long-...image=12345678

    .htaccess file code might be something like

    #RewriteRule ^([a-zA-Z0-9-]+)/([0-9]+)$ /index.php?title=$1&image=$2 [L,nc]

  3. #3
    Join Date
    Aug 2012
    Posts
    2
    Thanks very very much for your reply, Dasher - I'll do some more research now I know what area to look in, and see how it all goes together.

    Is there actually a name for this kind of processing? When searching I was really stumped to think of suitable keywords.

    Tim, currently in Laos.

  4. #4
    Join Date
    Jun 2008
    Location
    Europe
    Posts
    1,096
    Query String Appends

    or

    QSA


    http://httpd.apache.org/docs/2.2/mod/mod_rewrite.html

    Look at my posts from today, I just answered someone else's question about QSA earlier...

  5. #5
    Quote Originally Posted by Dasher View Post
    You can do those things with .htaccess and php code in the page. The "directory" is really a variable for the image title, and the number of course is the image number. .htaccess can parse the long directory name to a variable such as;

    http://www.mypage.com/a-long-title-goes-here/12345678 becomes

    http://www.mypage.com/?title=a-long-...image=12345678

    .htaccess file code might be something like

    #RewriteRule ^([a-zA-Z0-9-]+)/([0-9]+)$ /index.php?title=$1&image=$2 [L,nc]
    This is the right solution of your problem, i also use this method for generating a directory for higher ranking of my seo products.

    _________________________
    corporate SEO training

Thread Information

Users Browsing this Thread

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

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



Recent Articles