Adult Script Pro Community Forums

The forum is here for legacy reasons. No new posts will be created. User registration is disabled! If you have any questions, please email us or check https://www.adultscriptpro.com for more details!

You are not logged in.

#1 2013-10-29 00:14:29

xpornclub
Member
From: California
Registered: 2012-01-01
Posts: 445
Website

How to redirect 404 page to a Random Video

Edit modules/404/404.php and add:

$urls = array(
0 => 'http://domain.com/url/to-video-1/',
1 => 'http://domain.com/url/to-video-2/'
...
n => 'http://domain.com/url-to-video-n/'
);

VF::redirect($urls[rand(0, n)], 301);

Add this after the class initialization.

So the whole page should look like this,  this is what my page looks like.  But edit for your own videos whatever videos you want to use.

<?php
defined('_VALID') or die('Restricted Access!');
class VModule_404
{
	public function __construct()
	{
	}
	
	public function render()
	{
		// no ads displayed for our 404 pages
		VF::cfg_item_set('ads', (int) 0);
	
		VLanguage::load('frontend.global');
	
		VResponse::add_header('Status', '404 Not Found');
		$tpl = VF::factory('template');
		$tpl->meta_title = __('404-meta-title');
		$tpl->load(array('header', '404'));
		$tpl->display();
		
		VF::close();
		die();
	}
}
$urls = array(
0 => 'http://www.xpornclub.com/557626/hailey-cute-woman-large-toys-shows-her-cervix/',
1 => 'http://www.xpornclub.com/558412/cock-dildo-creampie/',
2 => 'http://www.xpornclub.com/207/moms-teaching-teens-honey-victoria/',
3 => 'http://www.xpornclub.com/206/belladonna-no-limits-anal-insertion-of-baseball-bat/',
4 => 'http://www.xpornclub.com/450/ass-parade-diana-bang-bros-bangbros-diana-moms-anal-adventure-diana/'
);

VF::redirect($urls[rand(0, 4)], 301);
?>

Offline

#2 2016-07-16 20:45:38

DuttyRock
Member
Registered: 2011-11-05
Posts: 740

Re: How to redirect 404 page to a Random Video

Is this a good or bad idea for seo?

Offline

#3 2016-07-17 16:22:37

xpornclub
Member
From: California
Registered: 2012-01-01
Posts: 445
Website

Re: How to redirect 404 page to a Random Video

I think its good, because it does not give a 404 error page for anything.  But the only bad thing I have had a problem with is DMCA notices.  I tell them the video is taken down and they go to the url but it redirects to another video and they think its still the same video is active.  So that is the only problem I have had with it.

Offline

#4 2016-07-17 18:20:33

Double_D
Member
From: The Netherlands
Registered: 2014-08-14
Posts: 305
Website

Re: How to redirect 404 page to a Random Video

Hello Xpornclub,

you can better do this "mark Delete" you can find this option in the video admin this way the url stays but the video is "gone" on the site and there is no random video.

Offline

#5 2016-07-17 21:00:03

DuttyRock
Member
Registered: 2011-11-05
Posts: 740

Re: How to redirect 404 page to a Random Video

Well just send the 404 to your homepage and not another video link wink


Why this don't work for mobile?

Last edited by DuttyRock (2016-07-17 21:37:24)

Offline

#6 2016-07-17 21:59:53

xpornclub
Member
From: California
Registered: 2012-01-01
Posts: 445
Website

Re: How to redirect 404 page to a Random Video

You mean my site, I just redirect mobile. I was getting to many people on mobile from china, now I redirect mobile traffic and I get about $30 per day from it.

Offline

#7 2016-07-18 05:44:14

symtab
Administrator
Registered: 2010-08-23
Posts: 7,501
Website

Re: How to redirect 404 page to a Random Video

Does google still index your site if you redirect mobile?


Adult Scripts: Adult Script Pro - Adult Search Script
Adult Advertising/Traffic: Plug Rush - EXOClick - PopAds

Offline

#8 2016-07-18 16:23:39

xpornclub
Member
From: California
Registered: 2012-01-01
Posts: 445
Website

Re: How to redirect 404 page to a Random Video

I have been doing it for 2 months now and I'm still indexed, no noticeable drop in traffic to my site either.

Offline

#9 2017-06-21 00:02:59

DuttyRock
Member
Registered: 2011-11-05
Posts: 740

Re: How to redirect 404 page to a Random Video

How can i redirect restricted access pages for example /media/videos/tmb/

Offline

Board footer

Powered by FluxBB