![]() |
![]() |
![]() |
||||
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 |
Confirmed User
Join Date: Feb 2004
Location: Alberta, Canada
Posts: 4,707
|
How do you redirect all 404 requests to a specific page, regardless of the subdomain?
Anyone know how to do this?
Basically all 404 requests to *.domain.com/* goes to domain.com/404.html
__________________
ICQ: 298-523-037 |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#2 |
Confirmed User
Join Date: Feb 2004
Location: Alberta, Canada
Posts: 4,707
|
bumpbump
__________________
ICQ: 298-523-037 |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#3 |
Confirmed User
Industry Role:
Join Date: Feb 2005
Posts: 370
|
RewriteEngine On
ErrorDocument 400 http://www.domain.com/404.html ErrorDocument 401 http://www.domain.com/404.html ErrorDocument 403 http://www.domain.com/404.html ErrorDocument 404 http://www.domain.com/404.html ErrorDocument 500 http://www.domain.com/404.html ErrorDocument 501 http://www.domain.com/404.html ErrorDocument 503 http://www.domain.com/404.html copy this to a text file in the root of all domains/sub domains that you want to redirect 404 traffic from and rename it to .htaccess or do the same and just use the "ErrorDocument 404" line from above that should do it, or someone here will correct me ![]()
__________________
[img]http://****************/sig/fhv3_b_468x60.gif[/img] |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#4 |
Confirmed User
Join Date: Oct 2006
Location: Sin City
Posts: 1,823
|
I have this in my .htacess file:
_____________________________________ # BEGIN WordPress <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] </IfModule> # END WordPress __________________________________ Where exactly would you put this, to make it function properly, before, or after? |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#5 | |
Confirmed User
Join Date: Feb 2004
Location: Alberta, Canada
Posts: 4,707
|
Quote:
domain.com/* -> 404.html works *.domain.com/ -> doesnt ![]()
__________________
ICQ: 298-523-037 |
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#6 |
Totally Borked
Industry Role:
Join Date: Feb 2005
Posts: 6,284
|
Code:
<IfModule mod_rewrite.c> RewriteEngine On ErrorDocument 404 http://www.domain.com/404.html RewriteBase / RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] </IfModule>
__________________
![]() For coding work - hit me up on andy // borkedcoder // com (consider figuring out the email as test #1) All models are wrong, but some are useful. George E.P. Box. p202 |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#7 |
►SouthOfHeaven
Join Date: Jun 2004
Location: PlanetEarth MyBoardRank: GerbilMaster My-Penis-Size: extralarge MyWeapon: Computer
Posts: 28,609
|
you need to setup wildcard subdomains
__________________
hatisblack at yahoo.com |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#8 |
►SouthOfHeaven
Join Date: Jun 2004
Location: PlanetEarth MyBoardRank: GerbilMaster My-Penis-Size: extralarge MyWeapon: Computer
Posts: 28,609
|
depending on your hoist its prob not setup that way by default so you will likely need to ask your host to setup wildcard subs
__________________
hatisblack at yahoo.com |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#9 |
Confirmed User
Join Date: Oct 2006
Location: Sin City
Posts: 1,823
|
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#10 |
Confirmed User
Join Date: Jan 2005
Location: United Kingdom
Posts: 7,990
|
I don't think the mod rewrite solution is the correct solution as it parses the headers as 200 instead of 404. This might look ok the the surfer but is technically incorrect and search engines won't like it much.
Correct me if I'm wrong. |
![]() |
![]() ![]() ![]() ![]() ![]() |