Good afternoon,
Long day today, I have a problem of performance on a live website, I decided to download the website as flat HTML so I can have time do perform tests on the app without having the client upset.
My problem is that when I do this migration I don't wanna have any of the google links going to pages that don't exist.
basically i wanna redirect this:
mywebsite.com/mypage to
mywebsite.com/en-GB/mypage.html
so far I could get to work the code to redirect from
mywebsite/mypage and
mywebsite/mypage/
to
mywebsite/mypage.html
My mod_rewrite knowledge is non existent but I'm trying as hard as I can to learn it.
So far I have this:
RewriteCond %{HTTP_HOST} !^en-GB$ [NC]
RewriteRule .? en-GB%{REQUEST_URI} [R=301,L]
this goes into a infinite loop and I don't understand why.
On my newbie logic it says "if u dont have en-GB on the URL redirect to en-GB + original url"
please help me this is really urgent and I have to figure it out as fast as I can.
Many thanks,
Angelo