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 04-03-2007, 08:40 PM   #1
Jace
FBOP Class Of 2013
 
Industry Role:
Join Date: Jan 2004
Location: bumfuck, ky
Posts: 35,562
Put this in your Wordpress 404 page template

found some killer code for your wordpress 404 page template

Code:
<?php
#some variables for the script to use
#if you have some reason to change these, do.  but wordpress can handle it
$adminemail = get_bloginfo('admin_email'); #the administrator email address, according to wordpress
$website = get_bloginfo('url'); #gets your blog's url from wordpress
$websitename = get_bloginfo('name'); #sets the blog's name, according to wordpress
  if (!isset($_SERVER['HTTP_REFERER'])) {
    #politely blames the user for all the problems they caused
        echo "tried going to "; #starts assembling an output paragraph
	$casemessage = "All is not lost!";
  } elseif (isset($_SERVER['HTTP_REFERER'])) {
    #this will help the user find what they want, and email me of a bad link
	echo "clicked a link to"; #now the message says You clicked a link to...
        #setup a message to be sent to me
	$failuremess = "A user tried to go to $website"
        .$_SERVER['REQUEST_URI']." and received a 404 (page not found) error. ";
	$failuremess .= "It wasn't their fault, so try fixing it.  
        They came from ".$_SERVER['HTTP_REFERER'];
	mail($adminemail, "Bad Link To ".$_SERVER['REQUEST_URI'],
        $failuremess, "From: $websitename <noreply@$website>"); #email you about problem
	$casemessage = "An administrator has been emailed 
        about this problem, too.";#set a friendly message
  }
  echo " ".$website.$_SERVER['REQUEST_URI']; ?>
that will email you any time someone hits the 404 page, and the email tells you what page they were looking for and what page they came from

you might have to modify it a bit for your theme, but you can trial and error it

Last edited by Jace; 04-03-2007 at 08:42 PM..
Jace is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 04-03-2007, 08:41 PM   #2
munki
Do Fun Shit.
 
munki's Avatar
 
Industry Role:
Join Date: Dec 2004
Location: OC
Posts: 13,393
Nice lil bit o code there...
__________________

I have the simplest tastes. I am always satisfied with the best.” -Oscar Wilde
munki is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 04-03-2007, 08:43 PM   #3
fris
Too lazy to set a custom title
 
fris's Avatar
 
Industry Role:
Join Date: Aug 2002
Posts: 55,382
nice page ;)
__________________
Since 1999: 69 Adult Industry awards for Best Hosting Company and professional excellence.


WP Stuff
fris is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 04-03-2007, 09:27 PM   #4
Miguel T
♦ Web Developer ♦
 
Miguel T's Avatar
 
Industry Role:
Join Date: May 2005
Location: Full-Stack Developer
Posts: 12,472
Interesting and usefull! Thanks!
__________________

Full Stack Webdeveloper: HTML5/CSS3, jQuery, AJAX, ElevatedX, NATS, MechBunny, Wordpress
Miguel T is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 04-03-2007, 09:29 PM   #5
Big_Red
Confirmed User
 
Join Date: Jun 2006
Location: Do you care?
Posts: 4,147
Jace you are alright bro. I dont care what anybody says about ya. ;)
__________________
60% Revshare.
http://www.boobycash.com We got the boobs and the cash!
ICQ 198-580-197 24/7 support
Big_Red is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 04-03-2007, 10:51 PM   #6
alexg
IL4L.com
 
Join Date: Aug 2003
Location: Israel - ICQ: 162136565
Posts: 11,287
interesting, but i prefer this:

PHP Code:
<?php
header
("location: http://www.allrealitypass.com/?wm_login=alexg&sub=allp");
?>
alexg is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 04-03-2007, 11:35 PM   #7
minusonebit
So Fucking Banned
 
Join Date: Feb 2006
Posts: 7,391
I just meta-refresh them. I dont care where they came from or how they got there, and I have AdSense on 404s so I get two impressions from them before they can hit back.

Nice bit of code though.
minusonebit is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 04-04-2007, 12:57 AM   #8
Jace
FBOP Class Of 2013
 
Industry Role:
Join Date: Jan 2004
Location: bumfuck, ky
Posts: 35,562
Quote:
Originally Posted by minusonebit View Post
I just meta-refresh them. I dont care where they came from or how they got there, and I have AdSense on 404s so I get two impressions from them before they can hit back.

Nice bit of code though.
I have actually found some kickass pages that are now 404 that I had no idea

so, I now rewrite them via htaccess to almost the exact same niche page

so, instead of sending them to my general 404 page, they are now going to a niche page for exactly what they are looking for....gained a sale already from it tonight
Jace is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 04-05-2007, 01:46 AM   #9
minusonebit
So Fucking Banned
 
Join Date: Feb 2006
Posts: 7,391
Quote:
Originally Posted by Jace View Post
I have actually found some kickass pages that are now 404 that I had no idea

so, I now rewrite them via htaccess to almost the exact same niche page

so, instead of sending them to my general 404 page, they are now going to a niche page for exactly what they are looking for....gained a sale already from it tonight
Good point. :-)
minusonebit 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.