GoFuckYourself.com - Adult Webmaster Forum

GoFuckYourself.com - Adult Webmaster Forum (https://gfy.com/index.php)
-   Fucking Around & Business Discussion (https://gfy.com/forumdisplay.php?f=26)
-   -   .htaccess question (https://gfy.com/showthread.php?t=221766)

cluck 01-16-2004 12:30 PM

.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?

powerbubba 01-16-2004 12:45 PM

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?

cluck 01-16-2004 12:48 PM

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.

Wiz 01-16-2004 02:06 PM

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!

Fu-Q 01-16-2004 02:12 PM

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

Wiz 01-16-2004 02:15 PM

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

arial 01-16-2004 02:18 PM

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.

jwerd 01-16-2004 02:50 PM

*cough* mod_rewrite *cough*

hahaha

jwerd 01-16-2004 02:51 PM

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

Wiz 01-16-2004 03:34 PM

All in *on* already ;)

Just need the line to add to the Htaccess ;)

cluck 01-16-2004 08:51 PM

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.

:glugglug

hudson 01-16-2004 08:54 PM

apache docs? :glugglug

cluck 01-16-2004 08:58 PM

Found it.

# - Send all htm requests to script - #
options all
RewriteEngine on
RewriteBase /
RewriteRule htm /your/script.php
# - End - #

cluck 01-16-2004 08:59 PM

Quote:

Originally posted by hudson
apache docs? :glugglug
Real men don't need docs :winkwink:

hudson 01-16-2004 09:03 PM

Quote:

Originally posted by cluck


Real men don't need docs :winkwink:

:thumbsup


All times are GMT -7. The time now is 03:40 AM.

Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123