angelboy Posted January 6, 2010 Share Posted January 6, 2010 First time post so be gentle please... I'd seen a SEO web company that has search specific geographical related information on their site and I wondered how it's done. Basically if you search for 'Name' then 'Location' their webpage reads the same name but the location you searched for. The URL was presented 'http://www.name.com/location.php?id=townname1' (then the various town names on the page depending on the town searched in. I've seen this also with local phone numbers depending on where the searcher has searched. When checked to see what google had indexed for the site it came up with 1270 pages all with the '/location.php?id=townname(etc)' URL. Does this mean the developer has created 1270 pages with the various town names or is it coded to insert only the town name searched for and if so how is then indexed with the search engines. Link to comment https://forums.phpfreaks.com/topic/187390-geographical-location-for-seo/ Share on other sites More sharing options...
cags Posted January 6, 2010 Share Posted January 6, 2010 The developer in that case has created a single page that use the $_GET variable id to fetch the information from another source (probably database). The individual 'towns' have then been indexed based on links to those specific URLs. Generally if a site such as this had been through an SEO process the link would actually be http://www.name.com/location/nottingham this page when requested from the server would then be passed through some sort of re-write module that would pass the URL to http://www.name.com/location.php?id=nottingham without the user knowing about it. Link to comment https://forums.phpfreaks.com/topic/187390-geographical-location-for-seo/#findComment-989569 Share on other sites More sharing options...
angelboy Posted January 6, 2010 Author Share Posted January 6, 2010 Is there a specific name for the code that does this or a tutorial someplace that may help me to create something similar? Link to comment https://forums.phpfreaks.com/topic/187390-geographical-location-for-seo/#findComment-989797 Share on other sites More sharing options...
cags Posted January 6, 2010 Share Posted January 6, 2010 Sure, if your website is hosted on an Apache server then you can use the mod_rewrite module (generally installed by default). A quick search for .htaccess files (which is the filename of files you will generally put the RewriteRules in) and mod_rewrite you will find dozens of examples. There's also a board for mod_rewrite. Link to comment https://forums.phpfreaks.com/topic/187390-geographical-location-for-seo/#findComment-989835 Share on other sites More sharing options...
angelboy Posted January 6, 2010 Author Share Posted January 6, 2010 Thanks, I'll have a look tomorrow when I'm a little more fresher! Link to comment https://forums.phpfreaks.com/topic/187390-geographical-location-for-seo/#findComment-989957 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.