Re: [InHouse] URL Syntax Question
Hi Jayme,
For the custom urls, google for mod_rewrite.
We recently upgraded all our Instant Websites product pages to use CMS Builder. So even though they look like this:
http://www.interactivetools.com/products/instant-
realty-website/
http://www.interactivetools.com/products/instant-
auto-website/requirements
.htmlhttp://www.interactivetools.com/products/instant-
listings-website/changelog
.htmletc
They're actually all driven by PHP files. We a single .htaccess file in each of those folders that uses mod_rewrite to rewrite the urls and looks like this:
RewriteEngine on
RewriteRule ^$ /products/instant-website-viewers/index.php?num=1 [nc]
RewriteRule ^(.*)\.html$ /products/instant-website-viewers/$1.php?num=1 [nc]
So when you request:
http://www.interactivetools.com/products/instant-
auto-website/requirements.html
What's requested behind the scenes is:
http://www.interactivetools.com/products/instant-
website-viewers/requirements
.php?num=2So the first step is to get all the pages displaying the way you want without worrying about the urls. Then figure out how you want the urls to look. Then figure out the mod_rewrite rules to convert:
www.mydomain.com/Vancouver/cityinfo.php to /cityinfo.php?city=Vancouver
and vancouver.mydomain.com/ to /index.php?city=Vancouver
Hope that helps! Keep us up to date with your progress!
Dave Edis - Senior Developer
interactivetools.com