Welcome to the GoFuckYourself.com - Adult Webmaster Forum forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.

Post New Thread Reply

Register GFY Rules Calendar
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >
Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed.

 
Thread Tools
Old 08-21-2013, 12:41 PM   #1
nexcom28
So Fucking Banned
 
Join Date: Jan 2005
Posts: 3,716
Quick .htaccess redirect question

How do you redirect for example:

domain.com/fat-boy/wicked

to

anotherurl.com/fat-boy-paradise

Using .htaccess with the rediect happening after 10 seconds

Thanks
nexcom28 is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 08-21-2013, 01:03 PM   #2
paffie
Confirmed User
 
Industry Role:
Join Date: Mar 2013
Posts: 116
i don't think you have a delay-option in htaccess... I'm not a guru, but i've never heared from such a thing...

Maybe you could use your html-headers for this:
<meta http-equiv="refresh" content="10; url=http://example.com/">
This way, you can show your original page, and it will automatically foreward after 10 seconds

or place a code like this in your php-code:
<?php
sleep(10);
header('Location: http://www.example.com/');
?>
This second option (including in php) might need some tweaking, since it's possible the header has to be sent before any other data is sent to the browser... (actually, i'm pretty sure of this)
__________________
Need a VPS? I use Ramnode, great uptime, friendly support and only $62/year (after their lifelong coupon) for an openVZ VPS => [email protected], 512Mb ram, 512 Mb swap, 120 Gb SSD, 1Gbps port, 2 Tb bandwith, 1 IPv4, 16 IPv6, weekly backups
paffie is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 08-21-2013, 01:10 PM   #3
nexcom28
So Fucking Banned
 
Join Date: Jan 2005
Posts: 3,716
Yeah the problem is I just want to redirect selected pages of a wordpress blog to an external url.
I did think about meta redirects but this would affect it sitewide wouldn't it.

If I went down the .php could I just not call the php from anywhere within the page or does it need to be in the header.

I'm sure there must be an easier way, a plugin or something.
nexcom28 is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 08-21-2013, 01:19 PM   #4
Barry-xlovecam
It's 42
 
Industry Role:
Join Date: Jun 2010
Location: Global
Posts: 18,083
Code:
Redirect permanent /path http://man-in-the-middle.com/meta-refresh-redirector-page.html?1
man-in-the-middle.com/meta-refresh-redirector-page has the 10 seconds delay. (Or, use a JavaScript on the wordpress pages only redirecting for that referring page ...)

https://www.google.com/search?client...+page+redirect

Last edited by Barry-xlovecam; 08-21-2013 at 01:22 PM..
Barry-xlovecam is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 08-21-2013, 01:23 PM   #5
nexcom28
So Fucking Banned
 
Join Date: Jan 2005
Posts: 3,716
Thanks I found a plugin after all Quick Page/Post Redirect Plugin
Seems to do the job.
nexcom28 is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 08-21-2013, 03:42 PM   #6
livexxx
Confirmed User
 
livexxx's Avatar
 
Industry Role:
Join Date: May 2005
Location: UK
Posts: 1,201
You need instant 301's and work on the canonical redirects as well. Is it for google or surfers?
__________________
http://www.webcamalerts.com for auto tweets for web cam operators
livexxx is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 08-21-2013, 04:12 PM   #7
AndrewX
Confirmed User
 
AndrewX's Avatar
 
Industry Role:
Join Date: Jan 2004
Posts: 574
RewriteEngine on
RedirectMatch /(.*)$ http://www.newdomain.com

Just did this for a client.

Edit: Oh I missed that 10 sec comment
__________________

█ ► XenLayer - Paravirtualization Professionals since 2008 - [ICQ: 297820698]
█ ► Reseller Hosting | OpenVZ VPS | XEN VPS | Dedicated Servers

Last edited by AndrewX; 08-21-2013 at 04:15 PM..
AndrewX is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 08-21-2013, 05:07 PM   #8
lucas131
¯\_(ツ)_/¯
 
Industry Role:
Join Date: Aug 2004
Posts: 11,475
Quote:
Originally Posted by nexcom28 View Post
Thanks I found a plugin after all Quick Page/Post Redirect Plugin
Seems to do the job.
yes happy you
lucas131 is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 08-22-2013, 01:11 AM   #9
paffie
Confirmed User
 
Industry Role:
Join Date: Mar 2013
Posts: 116
Quote:
Originally Posted by nexcom28 View Post
If I went down the .php could I just not call the php from anywhere within the page or does it need to be in the header.
I'm happy the plugin works for you :-)
In case anybody ever finds this post, and wants to use php instead of a plugin, the anser to your question is: the header location has to be set before any other data is sent to the users browser (if i remember correctly)...
In other words, you can actually make a database-query, use classes and functions,... and depending on the outcome of your querys and calculations print the "header('location" or not. As long as nothing is sent to the browser during the execution of your code.... So it wouldn't be wise to use this line in the <body>-section ;-)
__________________
Need a VPS? I use Ramnode, great uptime, friendly support and only $62/year (after their lifelong coupon) for an openVZ VPS => [email protected], 512Mb ram, 512 Mb swap, 120 Gb SSD, 1Gbps port, 2 Tb bandwith, 1 IPv4, 16 IPv6, weekly backups

Last edited by paffie; 08-22-2013 at 01:13 AM..
paffie is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 08-22-2013, 01:33 AM   #10
HomerSimpson
Too lazy to set a custom title
 
HomerSimpson's Avatar
 
Industry Role:
Join Date: Sep 2005
Location: Springfield
Posts: 13,826
Quote:
Originally Posted by AndrewX View Post
RewriteEngine on
RedirectMatch /(.*)$ http://www.newdomain.com

Just did this for a client.

Edit: Oh I missed that 10 sec comment
don't forget to add [r=301]
__________________
Make a bank with Chaturbate - the best selling webcam program
Ads that can't be block with AdBlockers !!! /// Best paying popup program (Bitcoin payouts) !!!

PHP, MySql, Smarty, CodeIgniter, Laravel, WordPress, NATS... fixing stuff, server migrations & optimizations... My ICQ: 27429884 | Email:
HomerSimpson is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Post New Thread Reply
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >

Bookmarks



Advertising inquiries - marketing at gfy dot com

Contact Admin - Advertise - GFY Rules - Top

©2000-, AI Media Network Inc



Powered by vBulletin
Copyright © 2000- Jelsoft Enterprises Limited.