Update: I have updated the file, I did comment that I was getting a 500 server error, but I don't know if that is was just a passing thing or if something in my .htaccess messed things up! Anyway this is the file I am now using and this works, by that no more 500 error but still will not keep me on my localhost, vaio-server but keeps transferring me to my live site!
Any Ideas?? Please??
DirectoryIndex index.php index.html
# Upload sizes
php_value upload_max_filesize 25M
php_value post_max_size 25M
# Avoid folder listings
Options -Indexes
<IfModule mod_rewrite.c>
# Redirect everyone but from visualhouse office
Options +FollowSymlinks
RewriteEngine on
RewriteBase /
# Maintenance
#RewriteCond %{REQUEST_URI} !/maintenance.html$
#RewriteCond %{REMOTE_ADDR} !(^127\.0\.1\.1)
#RewriteRule $ /maintenance.html [R=302,L]
#Redirects to www
RewriteCond %{HTTP_HOST} !^vaio-server [NC]
#RewriteCond %{HTTPS}s ^on(s)|off
#RewriteCond %{REMOTE_ADDR} 127\.0\.1\.1
RewriteRule ^(.*)$ http://vaio-server/$1 [R=301,QSA,L]
#Empty string
#RewriteCond %{REMOTE_ADDR} (^127\.0\.1\.1)
RewriteRule ^$ app/webroot/ [L]
#RewriteCond %{REMOTE_ADDR} (^127\.0\.1\.1)
RewriteRule (.*) app/webroot/$1 [L]
</IfModule>
I am hoping you can help me! Below is my .htaccess files for my Apache server running on top of Ubuntu server. This is my local server which I installed so I can develop my site on this instead of using my live site! However i have all my files and the database on my localhost now but each time I access my server, vaio-server (its a sony laptop), it just takes me to my live site! Now eveything is in the root of Apache, /var/www - its the only site I will develop on this system so I don't need to config this to look at any many than this one site!
I think thats all, all the Apache files, site-available/default ect are as standard. - Please Help!!
Many Thanks
Glenn Curtis.
DirectoryIndex index.php index.html
# Upload sizes
php_value upload_max_filesize 25M
php_value post_max_size 25M
# Avoid folder listings
Options -Indexes
<IfModule mod_rewrite.c>
Options +FollowSymlinks
RewriteEngine on
RewriteBase /
# Maintenance
#RewriteCond %{REQUEST_URI} !/maintenance.html$
#RewriteRule $ /maintenance.html [R=302,L]
#Redirects to www
#RewriteCond %{HTTP_HOST} !^vaio-server [NC]
#RewriteCond %{HTTPS}s ^on(s)|off
#RewriteRule ^(.*)$ glenns-showcase.net/$1 [R=301,QSA,L]
#Empty string
RewriteRule ^$ app/webroot/ [L]
RewriteRule (.*) app/webroot/$1 [L]
</IfModule>
apache2ctl configtestto check for the Server Error? And don't forget to check the logs too. – Lukas Jul 11 '12 at 14:19