Welcome to WebmasterWorld Guest from

Forum Moderators: Ocean10000 & phranque

Message Too Old, No Replies

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

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

New User

10+ Year Member

joined:Nov 30, 2008
votes: 0


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]


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
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