first time i have asked for help on here but never mind...
basically, we have added ajax for best-insults.com so it doesn't reload the page when all you are doing is voting for an insult. This is cool, however, if you aint on www.best-insults.com then the ajax doesn't work.
Just wondering if there was a simple way i could redirect the users to make sure they have www. in the url but if they come into the site at any other page other than the home page it doesn't redirect to the main page, ie if i put in redirect to http://www.best-insults.com/index.php and they come in on http://best-insults.com/rate.php it doesn't redirect them to http://www.best-insults.com/index.php. Just want it to add www. to tbe url without affecting where they come in to the site.
any suggestions anyone?
www. help
Started by bobbobicus, Jan 31 2007 07:28 AM
2 replies to this topic
#1
Posted 31 January 2007 - 07:28 AM
#2
Posted 31 January 2007 - 12:00 PM
not me coding it
sorted it out now anyways
#3
Posted 31 January 2007 - 12:11 PM
well, to answer your question not about ajax.
that would redirect a user that types 'http://best-insults.com' to 'http://www.best-insults.com'. it also would cover if you add on a domain so that it redirects that domain to 'http://www.best-insults.com'.
RewriteEngine on
RewriteCond %{HTTP_HOST} !^www.best-insults.com [NC]
RewriteRule ^(.*)$ http://www.best-insults.com/$1 [R,L]
that would redirect a user that types 'http://best-insults.com' to 'http://www.best-insults.com'. it also would cover if you add on a domain so that it redirects that domain to 'http://www.best-insults.com'.
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users
