Hi,
I have a site that works perfectly on the live domain.
I tried setting it up on my localhost server though, in order to develop some things, however the redirects don't work properly I am thinking.
I've modified the hosts file under system32 to point to the site and I've tried a lot of stuff but I can not seem to figure it out. By the way, the site resides exactly in the htdocs in a xampp instalation folder, with no other subfolders.
# mod_rewrite set:
Options +Includes
RewriteEngine on
# redirect if NOT www.site.com (exactly) to www.site.com
RewriteCond %{HTTP_HOST} .
RewriteCond %{HTTP_HOST} !^www\.site\.com
RewriteRule (.*) [
site.com...] [R=301,L]
# Styles directory is not rewrited
RewriteCond %{REQUEST_URI} ^(/+)styles/(.+)$
RewriteRule (.*) $1 [L]
# banners directory is not rewrited
RewriteCond %{REQUEST_URI} ^(/+)banners/(.+)$
RewriteRule (.*) $1 [L]
# images directory is not rewrited
RewriteCond %{REQUEST_URI} ^(/+)images/(.+)$
RewriteRule (.*) $1 [L]
# generator directory is not rewrited
RewriteCond %{REQUEST_URI} ^(/+)generator/(.+)$
RewriteRule (.*) $1 [L]
# favicon.gif
RewriteCond %{REQUEST_URI} ^(/+)favicon.gif$
RewriteRule (.*) $1 [L]
# robots.txt
RewriteCond %{REQUEST_URI} ^(/+)robots.txt$
RewriteRule (.*) $1 [L]
# googled9ea952696e75819.html
RewriteCond %{REQUEST_URI} ^(/+)googled9ea952696e75819.html$
RewriteRule (.*) $1 [L]
# index.html
RewriteCond %{REQUEST_URI} ^(/+)index.html$
RewriteRule (.*) $1 [L]
# sitemap.xml
RewriteCond %{REQUEST_URI} ^(/+)sitemap.xml$
RewriteRule (.*) $1 [L]
# ror.xml
RewriteCond %{REQUEST_URI} ^(/+)ror.xml$
RewriteRule (.*) $1 [L]
# sitemap.html
RewriteCond %{REQUEST_URI} ^(/+)sitemap.html$
RewriteRule (.*) $1 [L]
# Administration
RewriteCond %{REQUEST_URI} ^(/+)admin/(.*)$
RewriteRule (.*) %{DOCUMENT_ROOT}/admin/index.php [L,QSA]
# SystemCommands (starting with prefix _)
RewriteCond %{REQUEST_URI} !^(/+)syscmd.php$
RewriteCond %{REQUEST_URI} ^(/+)_([^/]+)$
RewriteRule ^_(.*)$ %{DOCUMENT_ROOT}/syscmd.php?cmd=$1 [L,QSA]
# SystemCommands (ending with _(.*))
RewriteCond %{REQUEST_URI} !^(/+)syscmd.php$
RewriteCond %{REQUEST_URI} (/+)_([^/]+)$
RewriteRule ^(.*)/_([^/]+)$ %{DOCUMENT_ROOT}/syscmd.php?page=$1&cmd=$2 [L,QSA]
# Rewrite orther
RewriteCond %{REQUEST_URI} !^(/+)index.php(.*)$
RewriteCond %{REQUEST_URI} !^(/+)syscmd.php$
RewriteRule ^(.*)$ %{DOCUMENT_ROOT}/index.php?page=$1 [L,QSA]
# If Rewriting Failure, Show error message (Internal backup)
RewriteCond %{REQUEST_URI} !^(/+)index.php$
RewriteCond %{REQUEST_URI} !^(/+)syscmd.php$
RewriteRule (.*) \1 [F]
Thanks for your help in advance.
Regards,
Lucian