Welcome to WebmasterWorld Guest from 54.80.68.137

Forum Moderators: Ocean10000 & incrediBILL & phranque

Message Too Old, No Replies

.htaccess: something more than “RewriteRule ^(.*)$ …”

     
11:23 am on Mar 3, 2011 (gmt 0)

New User

5+ Year Member

joined:Nov 30, 2008
posts:33
votes: 0


Hi,

I have several domains for my page: [mypage.es,...] [mypage.it.......] Now I'm trying to redirect just my french domain [mypage.fr...] to [mypage.com....] So I have tried this:

RewriteCond %{SERVER_PORT} ^443$
RewriteRule [mypage.fr$...] [mypage.com...] [R=301,L]

but doesn't redirect...

NOTE: This redirects ok:

RewriteCond %{SERVER_PORT} ^443$
RewriteRule ^(.*)$ [mypage.com...] [R=301,L]


Regards

Javi
8:46 pm on Mar 3, 2011 (gmt 0)

Senior Member

WebmasterWorld Senior Member g1smd is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

joined:July 3, 2002
posts:18903
votes: 0


RewriteRule can "see" only the path part of the requested URL.

You need a preceding RewriteCond if you want to examine HTTP_HOST, QUERY_STRING, SERVER_PORT or any other part of THE_REQUEST.
 

Join The Conversation

Moderators and Top Contributors

Hot Threads This Week

Featured Threads

Free SEO Tools

Hire Expert Members