One page, dynamic content using mod_rewrite
-
Is there a plugin that exists out there which saves me creating 12K+ pages, and instead updates one page’s content based on what is in the url?
Basically on my old site I had a script on my index.php page which checks the link for any specific keywords, and then uses them on the page.
For example:
The actual url is http://www.example.com/index.php
The sef url is http://www.example.com/toolhire/londonMy .htaccess script identifies the ‘london’ as a PHP $_GET variable called $_GET[‘location’]:
RewriteRule ^toolhire/?(.*) /index.php?loc=$1
It then places ‘London’ at various pre-defined places in index.php. Eg. the h1 tag would change from ‘The best tool hire in the UK’ to ‘The best tool hire in London’.
The whole point of this was to save building 1000’s of static pages for each location in the UK.
I have managed to get it working on a static page on my site, but I’d really like to use a WP page, so it is easy enough for my client to update the main content whenever they need to, and include any forms/widgets on it.
Cheers,
Ali.
The topic ‘One page, dynamic content using mod_rewrite’ is closed to new replies.