Cotton Rohrscheib

The Cotton Club Blog & Podcast

  • Home
  • Bio
    • Resume
  • Blog
    • Faith & Family
    • Marketing & Tech
    • Farm & Business
    • Entertainment
    • Health & Wellness
    • Urban Farming
    • Weekend Projects
  • Media
    • Newsletter
    • Photo Galleries
    • Instagram Feed
    • Video Archives
    • Podcasts
    • Music Playlists
  • Books
  • Connect
    • Rohrscheib Capital
    • Disclaimer
    • Privacy Policy
You are here: Home / Blog / Using mod_rewrite in Apache

Using mod_rewrite in Apache

September 26, 2007 by Cotton Rohrscheib Leave a Comment

I created a Real Estate solution for a client a while back in php and it has worked well for them but once the site launched we noticed that it wasn’t getting crawled by the search engines as well as we would have liked for it to so I did a little research.  I knew that typically data called in from a database dynamically presented a problem when it came to getting the best SEO performance. 

I asked a few developers this past year at HostingCon about this and they suggested I look into Mod Rewrite in apache and see if that wouldn’t help out.  I checked it out and so far the results have been phenomenal for the client.  Here’s what I did in case any of you run into a smilar situation.  I first created an .htaccess file to redirect to a “home page”, in this case it’s called index2.php.  Next I did a rewrite for the dynamically generated pages.  The .htaccess file looks like this:

Options +FollowSymLinksRewriteEngine OnRewriteRule ^index2.php  prime-listings/index_view.php?editid1=1RewriteRule ^prime-listings/lakefront_homes.php  prime-listings/prime_listings_list.php?a=search&value=1&SearchFor=Lakefront+Homes&SearchOption=Equals&SearchField=typeRewriteRule ^prime-listings/lakefront_lots.php  prime-listings/prime_listings_list.php?a=search&value=1&SearchFor=Lakefront+Lots&SearchOption=Equals&SearchField=typeRewriteRule ^prime-listings/lakeview_homes.php  prime-listings/prime_listings_list.php?a=search&value=1&SearchFor=Lakeview+Homes&SearchOption=Equals&SearchField=typeRewriteRule ^prime-listings/lakeview_lots.php  prime-listings/prime_listings_list.php?a=search&value=1&SearchFor=Lakeview+Lots&SearchOption=Equals&SearchField=typeRewriteRule ^prime-listings/river_properties.php  prime-listings/prime_listings_list.php?a=search&value=1&SearchFor=River&SearchOption=Equals&SearchField=typeRewriteRule ^prime-listings/residential_properties.php  prime-listings/prime_listings_list.php?a=search&value=1&SearchFor=Residential&SearchOption=Equals&SearchField=typeRewriteRule ^prime-listings/residential_lots.php  prime-listings/prime_listings_list.php?a=search&value=1&SearchFor=Residential+Lots&SearchOption=Equals&SearchField=RewriteRule ^prime-listings/commercial_properties.php  prime-listings/prime_listings_list.php?a=search&value=1&SearchFor=Commercial&SearchOption=Equals&SearchField=typeRewriteRule ^prime-listings/farm_land.php  prime-listings/prime_listings_list.php?a=search&value=1&SearchFor=acreage&SearchOption=Contains&SearchField=  

So now for example, instead of using http://www.greersferryrealestatecenter.com/prime-listings/prime_listings_list.php?a=search&value=1&SearchFor=Residential&SearchOption=Equals&SearchField=type as a link, I just use this: http://www.greersferryrealestatecenter.com/prime-listings/residential_properties.php. This is apparently more favorable to the search engines. 

Share this post on:

  • Click to share on Facebook (Opens in new window) Facebook
  • Click to share on X (Opens in new window) X
  • Click to share on LinkedIn (Opens in new window) LinkedIn
  • Click to share on Pinterest (Opens in new window) Pinterest

Related

About Cotton Rohrscheib

The Cotton Club is a monthly podcast hosted by me, Cotton Rohrscheib. I'm a 52 year old entrepreneur w/ ADHD, OCD (and now AARP) that refuses to grow up as I grow old. I have collaborated and invested in hundreds of projects throughout my career in multiple industries such as; technology, healthcare, and agriculture. I also have 25 years experience in the marketing industry as a co-founder of an award-winning advertising agency. I will undoubtedly cover a wide variety of topics on my podcast while sharing some really crazy stories and situations that I've been fortunate to witness firsthand. I also have a book coming out in 2025 titled, "Mistakes were Made"

Please Drop Your Questions or CommentsCancel reply

Let’s Connect

  • Email
  • Facebook
  • Instagram
  • LinkedIn
  • Twitter

Recent Updates

  • EP:032 – Cotton Rohrscheib & Diana DeHart
  • Challenges & Opportunities Going into 2025
  • Find us at the 2025 Arkansas Women in Agriculture Conference in Hot Springs, Arkansas
  • Be Sure to Checkout FBN’s Farmers First™  Crop Nutrition & Adjuvant Lineup for 2025
  • What we all need in Dark Times…

Blog Categories

  • Blog (419)
  • Entertainment (376)
  • Faith & Family (147)
  • Farm & Business (288)
  • Health & Wellness (33)
  • Marketing & Tech (584)
  • Podcasts (31)
  • Urban Farming (20)
  • Weekend Projects (1)

Listen & Subscribe

Blog Archives

Join the Cotton Club!

 

Content Copyright: 2001-2025
Cotton Rohrscheib | Rohrscheib Capital