Forum Moderators: phranque

Message Too Old, No Replies

RewriteRule for HTTP and HTTPS

         

dexcode

4:25 pm on May 13, 2011 (gmt 0)

10+ Year Member



I am trying to create a rule in the htaccess to redirect this URL (space added after http to display url correctly here on the forum)

[url]http ://pocketfinder.com/mobile/iphone/silentlogin.aspx[/url]

and this one

[pocketfinder.com ]

to the following

[iphone.pocketfinder.com ]

I currently have this in the .htaccess which works for the top URL but not the bottom one.

RewriteRule ^.*/silentlogin.aspx$ [iphone.pocketfinder.com...] [QSA,L]

It must be mentioned that the first 2 URLs are on one server and the end address is on another server. Also the first server does not currently have an SSL but the second server does.

Any help in this matter is greatly appreciated.

Cheers,
Dex

g1smd

8:36 am on May 14, 2011 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



It might be that http and https requests are served by different folders on the old server. Place the redirect code for https on the old server in the folder that those https requests resolve to.