Real Estate Forums

Coding HTML, ASP, PHP, JAVA MYSQL and more. All coding questions should be asked here.

Reply
 
Thread Tools Display Modes
Old 07-20-2007, 05:22 AM
Ryan Ward's Avatar
Ryan Ward Ryan Ward is offline
Uber Real Estate Webmaster
Recently blogged:
Dunwoody Open House
at my REW Blog. Claim your blog
 
Join Date: Oct 2006
Location: Alpharetta
Posts: 3,450
Ryan Ward is on a distinguished road
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
__________________
Ryan Ward, REALTORŪ - Keller Williams Realty Consultants. (404) 630-3187
Atlanta Real Estate - My featured area is Alpharetta Real Estate and it is where I call home. Read my Atlanta Real Estate blog.
Reply With Quote
Old 07-20-2007, 10:23 PM
Aaron Aaron is online now
Real Estate Webmasters Staff
 
Join Date: Jun 2005
Location: Nanaimo
Posts: 7,800
Aaron is on a distinguished road
Send a message via MSN to Aaron
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
Programming Support
Real Estate Webmasters
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

For our members

Main Sections

IDX Coverage Areas

Spiders Welcome

All times are GMT -7. The time now is 05:10 PM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.