[Wylug-help] Apache .htaccess file.
Douglas G Mckendrick
douglasg.mckendrick at googlemail.com
Fri Oct 16 21:07:54 UTC 2009
Hi all, and thanks for your replies.
>
> Try putting this line before all the above:
>
> RewriteEngine on
>
The above was already added to the file.
I tried:
RewriteRule ^.*$ http://www.%1.%2%{REQUEST_URI} [R=301,L]
But it just made my site inaccessible.
I believe my site is hosted on a standard port, infact it is on port 80.
Below is a copy of my file.
cheers
Doug
<IfModule mod_ssl.c>
RewriteBase /d******.co.uk/
</IfModule>
<IfModule !mod_ssl.c>
RewriteBase /
</IfModule>
RewriteEngine On
RewriteRule ^([^.]*)$ index.cgi/$1 [L,NE]
RewriteEngine On
RewriteRule ^([^.]*)$ index.cgi/$1 [L]
# For sites running on a port other than 80
RewriteCond %{HTTP_HOST} !^www\.d******\.co.uk [NC]
RewriteCond %{HTTP_HOST} !^$
RewriteCond %{SERVER_PORT} !^80$
RewriteRule ^/(.*) http://www.d******.co.uk:%{SERVER_PORT}/$1
[L,R]
# And for a site running on port 80
RewriteCond %{HTTP_HOST} !^www\.d******\.co.uk [NC]
RewriteCond %{HTTP_HOST} !^$
RewriteRule ^/(.*) http://www.d*******.co.uk/$1 [L,R]
More information about the Wylug-help
mailing list