bloody regular expressions
Thread Starter
Scooby Regular
Joined: Sep 2001
Posts: 4,670
Likes: 0
From: Kingston ( Surrey, not Jamaica )
I want to strip the www. from a domain , then redirect on context to https:// if applicable...
Having beaten myself with this for too long, a fresh pair of eyes is required...
RewriteCond %{HTTP_HOST} ^www\.foo\.bar\.com$ [NC]
RewriteRule ^(.*)$ http://foo.bar.com/$1 [R=301]
RewriteCond %{SERVER_PORT} !^443$
RewriteRule ^/(place/.*)$ https://%{HTTP_HOST}$1 [R=301,L]
WTF is wrong ...
Steve
Having beaten myself with this for too long, a fresh pair of eyes is required...
RewriteCond %{HTTP_HOST} ^www\.foo\.bar\.com$ [NC]
RewriteRule ^(.*)$ http://foo.bar.com/$1 [R=301]
RewriteCond %{SERVER_PORT} !^443$
RewriteRule ^/(place/.*)$ https://%{HTTP_HOST}$1 [R=301,L]
WTF is wrong ...
Steve
Sorry chap, wish I could help but I'm rubbish with RegEx.
I use this when I need a hand: Regular-Expressions.info - Regex Tutorial, Examples and Reference - Regexp Patterns
I use this when I need a hand: Regular-Expressions.info - Regex Tutorial, Examples and Reference - Regexp Patterns
Thread
Thread Starter
Forum
Replies
Last Post
Wingnuttzz
Member's Gallery
30
Apr 26, 2022 11:15 PM



