Real Estate Forums
| Coding HTML, ASP, PHP, JAVA MYSQL and more. All coding questions should be asked here. |
![]() |
|
|
Thread Tools | Display Modes |
|
||||
|
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. |
|
|||
|
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>
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. |
![]() |
| Thread Tools | |
| Display Modes | |
|
|