Forum Moderators: phranque

Message Too Old, No Replies

Rewriting to secure server?

         

ahmedtheking

11:22 pm on Sep 12, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I have moved my website to a https connection as oppose to a http (e-commerce and makes life simpler); anyway, is there a way to rewrite urls such as [mywebsite......] and so on to [mywebsite......]

ahmedtheking

12:03 am on Sep 13, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



No worries, I've done it! Here's the code if anyone wants it:

RewriteRule ^(.*) [yourdomain.co.uk...]

For those who don't know...
^ = start of the string
(.*) = pattern 1 (where . = any char (google regular expression) and * = 1 or more)

and then set your domain and refer to each pattern as $n where n is the pattern no., in this case theres only 1 so n = 1!

jdMorgan

1:24 am on Sep 13, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Ahmed,

I missed your first post, but I'm glad you figured it out!

BTW, "*" is "zero or more," while "+" is "one or more."

Jim

ahmedtheking

11:06 am on Sep 13, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



That's right! My bad!