I have on Have-Host a website that when you go to:
http://macusersuk.org/offers/offers.php
Instead of:
http://www.macusersuk.org/offers/offers.php
And try to get an offer code, the user gets this error:
You may not access this page directly: please follow the correct route
Referrer was:
http://macusersuk.org/offers/requestoffercode.php?OfferCode=IPNM
Is there an easy way to use mod_rewrite function to change incoming requests
for http://macusersuk.org to http://www.macusersuk.org
???
Best wishes Peter
–
================================
Peter Tucker, Oxford UK email@hidden
offtopic mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options
Paul4
(Paul)
October 16, 2009, 8:21am
2
This in your .htaccess file may well do the job:
RewriteEngine ON
RewriteRule ^(.*)$ http://www.macusersuk.org$1 [R=301,L]
More about this here:
http://www.gnc-web-creations.com/301-redirect.htm
offtopic mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options
on 16/10/2009 09:21, Paul at email@hidden wrote:
This in your .htaccess file may well do the job:
RewriteEngine ON
RewriteRule ^(.*)$ http://www.macusersuk.org$1 [R=301,L]
More about this here:
GNC Web Creations // Touch Point Digital Marketing Agency in New Orleans & Chicago
Cheers Paul, much appreciated.
I’m interested in your Joomla actions, I’ll be looking at them over the next
few weeks ;~}}
Best wishes Peter
–
================================
Peter Tucker, Oxford UK email@hidden
offtopic mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options
waltd
(Walter Davis)
October 16, 2009, 11:58am
4
This is one of the classic examples given in the Mod Rewrite manual:
http://httpd.apache.org/docs/2.0/misc/rewriteguide.html
RewriteCond %{HTTP_HOST} !^www.example.com [NC]
RewriteCond %{HTTP_HOST} !^$
RewriteRule ^/(.*) http://www.example.com/$1 [L,R]
The key to this is to not rewrite all requests to www, Paul’s solution absolutely will work, but it will put all requests through the redirect. The first two lines of this rule check to see if the host is already correct, or if it’s missing, and only if it’s missing, then redirect.
Walter
offtopic mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options
Hello!
Popping in here to say that the domain is not pointing to the
server… it is being redirected… This means that there is no A
Record for the domain… The server is configured to recognize both www.domain.blah
or domain.blah.
Cheers!
James
offtopic mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options