
May 17th, 2012, 11:37 AM
|
 |
<?php print_f(); ?>
|
|
Join Date: Jul 2004
Location: London
|
|
|
mod_rewrite - Changing hosting folder
Hi guys,
I've been making a few changes to my site, originally I had a php file which would redirect you to the folder hosting my site i.e. /site/ but what I found is that Google wasn't indexing my homepage because of this redirect.
So, I decided to place this code in a .htaccess file and it works fine for main domain (joharaphotography.com) but I have two domains, the second domain uses cURL to get the same page and display that but when you go that site it takes a looooong time to load or sometimes it fails all together.
Can anyone help me fix this please?
Code:
RewriteEngine on
RewriteCond %{HTTP_HOST} ^(www.)?joharaphotography.com$ [OR]
RewriteCond %{HTTP_HOST} ^(www.)?joharagroup.com$
RewriteCond %{REQUEST_URI} !^/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /site/$1
RewriteCond %{HTTP_HOST} ^(www.)?joharaphotography.com$ [OR]
RewriteCond %{HTTP_HOST} ^(www.)?joharagroup.com$
RewriteRule ^(/)?$ site/index.php [L]
|