/    Sign up×
Community /Pin to ProfileBookmark

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:

[url]http://www.gettyimages.com/detail/photo/london-underground-tube-sign-outside-big-high-res-stock-photography/148624493[/url]

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.
[url]http://www.gnomeplanet.com/gallery.php[/url]

to post a comment
PHP

4 Comments(s)

Copy linkTweet thisAlerts:
@DasherAug 04.2012 — 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-title-goes-here&image=12345678

.htaccess file code might be something like

#RewriteRule ^([a-zA-Z0-9-]+)/([0-9]+)$ /index.php?title=$1&image=$2 [L,nc]
Copy linkTweet thisAlerts:
@gnomeplanetauthorAug 04.2012 — 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.
Copy linkTweet thisAlerts:
@donatelloAug 08.2012 — 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...
Copy linkTweet thisAlerts:
@ksushil970Oct 05.2012 — 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-title-goes-here&image=12345678

.htaccess file code might be something like

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


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
×

Success!

Help @gnomeplanet spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 4.29,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,

tipper: @Samric24,
tipped: article
amount: 1000 SATS,
)...