Forum Moderators: phranque

Message Too Old, No Replies

non www to www

showing additional /

         

Carpy

4:08 pm on Jan 25, 2006 (gmt 0)

10+ Year Member



Im using this rewrite:

RewriteCond %{HTTP_HOST} ^domain\.co\.uk [NC]
RewriteRule ^(.*) [domain.co.uk...] [R=301,L]

but the url is showing:

www.domain.co.uk//

how can i remove the last /

thanks

jdMorgan

4:31 pm on Jan 25, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I assume you're putting the code in httpd.conf, rather than .htaccess. The 'rules' change slightly if so:

RewriteCond %{HTTP_HOST} ^domain\.co\.uk [NC]
RewriteRule [b]^/([/b].*) http://www.domain.co.uk/$1 [R=301,L]

Jim

Carpy

4:33 pm on Jan 25, 2006 (gmt 0)

10+ Year Member



thanks - im using .htaccess file?

jdMorgan

4:39 pm on Jan 25, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Sounds like you have a configuration problem with the server then... :(

Ask your host to remove the trailing slash from your ServerName [httpd.apache.org] setting, and to set UseCanonicalName [httpd.apache.org] to 'off'.

Jim