943,926 Members | Top Members by Rank

Ad:
  • PHP Discussion Thread
  • Unsolved
  • Views: 882
  • PHP RSS
Jul 23rd, 2008
0

redirect page

Expand Post »
i have a problem: i want redirect everything page in url: ex: http://dracotech.biz to http://www.dracotech.biz . want to add www. in everything request from user.. maybe with mode rewrite in apache but i didn't find way how to do it..
Similar Threads
Reputation Points: 10
Solved Threads: 1
Junior Poster in Training
forzadraco is offline Offline
70 posts
since Mar 2008
Jul 24th, 2008
0

Re: redirect page

Click to Expand / Collapse  Quote originally posted by forzadraco ...
i have a problem: i want redirect everything page in url: ex: http://dracotech.biz to http://www.dracotech.biz . want to add www. in everything request from user.. maybe with mode rewrite in apache but i didn't find way how to do it..

PHP Syntax (Toggle Plain Text)
  1. RewriteCond %{HTTP_HOST} ^domain.com$ [NC]
  2. RewriteRule ^(.*)$ http://www.domain.com/$1 [R=301
Moderator
Reputation Points: 457
Solved Threads: 101
Nearly a Posting Virtuoso
digital-ether is offline Offline
1,250 posts
since Sep 2005
Mar 4th, 2010
0

real estate scripts at www.instantrankingseo.com

TRY THIS BELOW CODE

---------------------------------------------------------------

<form name="Downloadphpscript and Justdialclone">
<center>
<font face="Arial"><b>You will be redirected to the script in<br><br>
<form>
<input type="text" size="3" name="redirect2">
</form>
seconds</b></font>
</center>

<script>
<!--

/*
Count down then redirect script
By JavaScript Kit (yourwebsitename)
Over 400+ free scripts here!
*/

//change below target URL to your own
var targetURL="yourwebsitename"
//change the second to start counting down from
var countdownfrom=10


var currentsecond=document.redirect.redirect2.value=countdownfrom+1
function countredirect(){
if (currentsecond!=1){
currentsecond-=1
document.redirect.redirect2.value=currentsecond
}
else{
window.location=targetURL
return
}
setTimeout("countredirect()",1000)
}

countredirect()
//-->
</script>
Reputation Points: 10
Solved Threads: 0
Newbie Poster
scripts99 is offline Offline
4 posts
since Mar 2010
Mar 4th, 2010
0

redirecting with .htaccess

Click to Expand / Collapse  Quote originally posted by forzadraco ...
i have a problem: i want redirect everything page in url: ex: http://dracotech.biz to http://www.dracotech.biz . want to add www. in everything request from user.. maybe with mode rewrite in apache but i didn't find way how to do it..
*if* your host supports redirects from .htaccess files *and* if you're on a Linux based machine running apache, the following lines in an .htaccess file should do the trick:
PHP Syntax (Toggle Plain Text)
  1. Options +FollowSymLinks
  2.  
  3. RewriteEngine On
  4.  
  5. RewriteCond %{HTTP_HOST} ^(dracotech\.biz)$ [NC]
  6. RewriteRule ^(.*)$ http://www.%1/$1 [R=301,L]

I hope this helps.

-Ray
Reputation Points: 11
Solved Threads: 1
Newbie Poster
rsleventhal is offline Offline
5 posts
since Jun 2008

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in PHP Forum Timeline: storing in an array
Next Thread in PHP Forum Timeline: Storing Leading Zeros for Id field in Table





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC