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 01-16-2004, 12:30 PM   #1
cluck
Confirmed User
 
Join Date: Dec 2002
Location: New Jersey
Posts: 5,248
.htaccess question

Anyone know how I can make it so if a person visits(for example) http://mydomain.com/hey-i-just-made-this-up.htm but that page doesn't exist, the host responds like it does exist but runs another script to return the content?
__________________
icq 279990726
www.mcdonalds.com <- great money making opportunity
cluck is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 01-16-2004, 12:45 PM   #2
powerbubba
Confirmed User
 
Join Date: Jan 2004
Posts: 358
perhaps getting into more details, are you wanting your server to send a 302 (Found) message back to the browser instead of a 404 (Not Found) message, then also provide content as well?

Or are you wanting to do a simple redirect on all 404 error messages?
__________________
GreatGirls.com
[email protected]
CrowsCrypt.com - Exclusive High Quality Goth
www.crowscrypt.com
powerbubba is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 01-16-2004, 12:48 PM   #3
cluck
Confirmed User
 
Join Date: Dec 2002
Location: New Jersey
Posts: 5,248
Quote:
Originally posted by powerbubba
perhaps getting into more details, are you wanting your server to send a 302 (Found) message back to the browser instead of a 404 (Not Found) message, then also provide content as well?

Or are you wanting to do a simple redirect on all 404 error messages?
I want it to make it seem to the browser like the file is actually there.
__________________
icq 279990726
www.mcdonalds.com <- great money making opportunity
cluck is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 01-16-2004, 02:06 PM   #4
Wiz
Confirmed User
 
Join Date: Dec 2002
Location: x
Posts: 223
Bump ;)

I need the same info
and if its working with diff extention , like pdf etc etc

IE:

I have a folder called /temp/
I have ONLY 1 file, blabla.pdf in this folder

I want to link from many html pages , many differents names to join this pdf like /temp/toto.pdf /temp/tata.pdf

So the server provide the content of blabla.pdf to all other file reuqests.

Thanks!
__________________
!
Wiz is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 01-16-2004, 02:12 PM   #5
Fu-Q
Confirmed User
 
Join Date: Jul 2003
Location: Seattle
Posts: 1,546
Quote:
Originally posted by Wiz
Bump ;)

I need the same info
and if its working with diff extention , like pdf etc etc

IE:

I have a folder called /temp/
I have ONLY 1 file, blabla.pdf in this folder

I want to link from many html pages , many differents names to join this pdf like /temp/toto.pdf /temp/tata.pdf

So the server provide the content of blabla.pdf to all other file reuqests.

Thanks!
if you are pointing them all to the same file, why not use a redirect
__________________
AIM - X8U
ICQ - 195301080
Fu-Q is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 01-16-2004, 02:15 PM   #6
Wiz
Confirmed User
 
Join Date: Dec 2002
Location: x
Posts: 223
For some reason ..

I need the server to provide the content from the original file without doing some mod on the url in the nav bar
__________________
!
Wiz is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 01-16-2004, 02:18 PM   #7
arial
Confirmed User
 
arial's Avatar
 
Join Date: Jul 2002
Location: Bay Area
Posts: 4,012
Ok well if I understand you right (which I don't thing I don't) add this to your 404.shtml:

PHP Code:
<!--#include virtual="/path/to/script.php" --> 
Then a make a php script (example script.php) and do this in it:

PHP Code:
<? include("/path/to/content.page"); ?>
Make sure 404 is at least 550 bytes if I remember right.
arial is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 01-16-2004, 02:50 PM   #8
jwerd
Confirmed User
 
Industry Role:
Join Date: Jun 2003
Location: Costa Rica
Posts: 1,953
*cough* mod_rewrite *cough*

hahaha
__________________
Yii Framework Guru - Seasoned PHP vet - Partner @ XXXCoupon.com
jwerd is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 01-16-2004, 02:51 PM   #9
jwerd
Confirmed User
 
Industry Role:
Join Date: Jun 2003
Location: Costa Rica
Posts: 1,953
Anyone needing this done to your server, I can do it for a reasonable price...say $50.00 and have it installed and running perfectly on your server (provided you have php/apache/mysql and mod_rewrite turned on) ....

hit me up on icq or email me!

[email protected]
304634638

lamerhooD
__________________
Yii Framework Guru - Seasoned PHP vet - Partner @ XXXCoupon.com
jwerd is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 01-16-2004, 03:34 PM   #10
Wiz
Confirmed User
 
Join Date: Dec 2002
Location: x
Posts: 223
All in *on* already ;)

Just need the line to add to the Htaccess ;)
__________________
!
Wiz is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 01-16-2004, 08:51 PM   #11
cluck
Confirmed User
 
Join Date: Dec 2002
Location: New Jersey
Posts: 5,248
Bumb

I don't want to redirect the traffic, I don't think wiz does either. I need it to have my script output it as if the page existed. My script will dynamically create the page based on what the requested filename was.

__________________
icq 279990726
www.mcdonalds.com <- great money making opportunity
cluck is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 01-16-2004, 08:54 PM   #12
hudson
Confirmed User
 
Join Date: Jul 2003
Location: Grand Central
Posts: 2,948
apache docs?
hudson is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 01-16-2004, 08:58 PM   #13
cluck
Confirmed User
 
Join Date: Dec 2002
Location: New Jersey
Posts: 5,248
Found it.

# - Send all htm requests to script - #
options all
RewriteEngine on
RewriteBase /
RewriteRule htm /your/script.php
# - End - #
__________________
icq 279990726
www.mcdonalds.com <- great money making opportunity
cluck is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 01-16-2004, 08:59 PM   #14
cluck
Confirmed User
 
Join Date: Dec 2002
Location: New Jersey
Posts: 5,248
Quote:
Originally posted by hudson
apache docs?
Real men don't need docs
__________________
icq 279990726
www.mcdonalds.com <- great money making opportunity
cluck is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 01-16-2004, 09:03 PM   #15
hudson
Confirmed User
 
Join Date: Jul 2003
Location: Grand Central
Posts: 2,948
Quote:
Originally posted by cluck


Real men don't need docs
hudson 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.