+ Reply to Thread
Results 1 to 2 of 2

Thread: rewrite rule for a singe page

  1. #1
    Join Date
    Oct 2006
    Location
    Alpharetta
    Posts
    4,447

    Default rewrite rule for a singe page

    What would go in my htaccess file to change this:

    ryanwardrealestate.com/WordPress/peachtree-park-real-estate to

    wwwDOTryanwardrealestate.com/WordPress/peachtree-park-real-estate

    and is there an issue if the URL goes to the same place with or without a / at the very end as it appears that it goes to the same page with or without the forward slash at the end. I would think that it should only work on way, but, not both. This applies to all pages.

    Thanks,

    Ryan
    For up to date information about the Atlanta real estate market, please visit my Atlanta Real Estate blog. I live in Alpharetta and love to talk about and sell Alpharetta real estate. I am a Member of the Institute for Luxury Home Marketing and I am a Certified Luxury Home Marketing Specialist. I also belong to the Atlanta homes of Distinction.

    Ryan Ward - REALTORŪ, CDPE, CLHMS, ILHM
    Premier Atlanta Real Estate - Keller Williams Realty Consultants.
    Direct: (404) 630-3187

  2. #2
    Aaron is online now Real Estate Webmasters Staff Aaron's Most Recent Blog Entry: Email etiquette Aaron is on a distinguished road
    Join Date
    Jun 2005
    Location
    Nanaimo
    Posts
    24,278

    Default Re: rewrite rule for a singe page

    Hi Ryan,

    The code that was there was good - but it seemed to be in the wrong order.
    It should look like this.


    Code:
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /WordPress/
    
    RewriteCond %{HTTP_HOST} !^www\.ryanwardrealestate\.com [NC]
    RewriteRule ^(.*) http://www.ryanwardrealestate.com/WordPress/$1 [L,R=301]
    
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /WordPress/index.php [L]
    </IfModule>
    (before the 3rd and 4rth line were below the closing </ifmodule>)

    I went ahead and made the changes to your .htaccess file - which seemed to make it work as you would like.

    I don't think that it's an issue to have it show with both the trailing slash and without, as long as your links to those pages remain consistent. I would recommend linking to the pages with the trailing slash.
    Aaron
    Real Estate Webmasters ( Programming )
    Client Resources | Tutorials | Suggested Enhancements

+ Reply to Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts