![]() |
![]() |
![]() |
||||
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. |
![]() ![]() |
|
Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed. |
|
Thread Tools |
![]() |
#1 |
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 |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#2 |
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 |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#3 |
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. |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#4 |
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 ...) |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#5 |
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. |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#6 |
Confirmed User
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?
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#7 |
Confirmed User
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 |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#8 |
¯\_(ツ)_/¯
Industry Role:
Join Date: Aug 2004
Posts: 11,475
|
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#9 | |
Confirmed User
Industry Role:
Join Date: Mar 2013
Posts: 116
|
Quote:
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 |
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#10 | |
Too lazy to set a custom title
Industry Role:
Join Date: Sep 2005
Location: Springfield
Posts: 13,826
|
Quote:
__________________
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: ![]() |
|
![]() |
![]() ![]() ![]() ![]() ![]() |