GoDaddy .htaccess mod_rewrite is working!!!

Ok, so I know this is a little out of the blue but a recently acquired SEO client is using GoDaddy for their hosting. Their domain name is something to the effect of www.chicago(businesstype).com. I’ve only been optimizing the site for a couple of weeks and we’re already doing well for keyword phrases using “chicago.”

However, the client wants to attack markets in the surrounding suburbs so I needed to come up with a quick way to create “city pages” for each new market. I did this by using www.domain.com/cityPage.php?city=name. Easy enough…but i needed something friendlier for Google. Enter mod_rewrite for GoDaddy.

I searched around online until I found this combination which works for me.
Original URL: www.domain.com/cityPage.php?city=name (meh)
New URL: www.domain.com/name (wonderful!)

Here’s the magic code!
Options FollowSymLinks
Options -MultiViews
RewriteEngine on
RewriteRule ^([^/.]+)/?$ /cityPage.php?city=$1 [L]

You can see this code working at theĀ Chicago Title Loans site (www.chicagotitleloans.com)

Enjoy!

thx to the following sites for your help!
http://gidden.net/tom/2006/05/26/4/
http://surf11.com/entry/153/godaddy-hosting-mod-rewrite-with-htacces
http://www.btjones.com/2007/12/09/godaddy-mod_rewrite-problem-fix/
http://www.webmasterworld.com/apache/3380566.htm

Share:
  • Facebook
  • Twitter
  • Google Bookmarks
  • del.icio.us
  • Digg
  • Sphinn
  • LinkedIn
  • Posterous
  • email
  • Print

4 Responses to “GoDaddy .htaccess mod_rewrite is working!!!”


  1. Mod_Rewrite for GoDaddy and Wordpress | Ken Shafer's Bloggity-Blog

    [...] in 2008 I posted an article about getting mod_rewrite working on a GoDaddy account. I thought it’d be a good time to update that information with another example. This time [...]

  2. Loyadlywoonry

    winsome answers i like it

  3. Manoj

    I came across the similar situation where i need to know how to run my site like http://www.username.domainname.com which should point to http://www.domainname.com/username/ and so on…

    I tried so many tricks for changing the .htaccess file. Please kindly provide me help… its urgent

    I am also using godaddy control panel…

    thanks…

  4. Mark Winstein

    Ken,
    Thanks!
    This worked for me!

Spam protection by WP Captcha-Free