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)
-   -   Quick htaccess question (https://gfy.com/showthread.php?t=504498)

Damian_Maxcash 08-16-2005 05:28 PM

Quick htaccess question
 
Im trying to redirect a site temperarily and thought htaccess redirect would be the way to go.

I cant seem to get it to redirect from the root though.

Ive tried - Redirect / http://www.eprosites.com/404.htm

Redirect /* http://www.eprosites.com/404.htm

Redirect */ http://www.eprosites.com/404.htm

any ideas :Oh crap

monaro 08-16-2005 05:40 PM

G'day,

fusionx wrote a very useful post here back on 1-07-2005
http://www.gofuckyourself.com/showthread.php?t=413223

I found most useful this part that might help you with what you need to do...
RewriteEngine on
RewriteCond %{HTTP_HOST} !^www\.primanudes\.com
RewriteRule (.*) http://www.primanudes.com/$1 [R=permanent,L]

jimmyf 08-16-2005 05:48 PM

i found on http://www.javascriptkit.com/howto/htaccess7.shtml


Redirect /olddirectory/oldfile.html http://yoursite.com/newdirectory/newfile.html

Note that there are 3 parts to that, which should all be on one line : the Redirect command, the location of the file/directory you want redirected relative to the root of your site (/olddirectory/oldfile.html = yoursite.com/olddirectory/oldfile.html) and the full URL of the location you want that request sent to. Each of the 3 is separated by a single space, but all on one line. You can also redirect an entire directory by simple using Redirect /olddirectory http://yoursite.com/newdirectory/

Using this method, you can redirect any number of pages no matter what you do to your directory structure. It is the fastest method that is a global affect.

vending_machine 08-16-2005 05:48 PM

If you have mod_rewrite, this should do it:

Code:

RewriteEngine on
RewriteRule ^/ http://www.eprosites.com/404.htm [R,L]


vending_machine 08-16-2005 05:53 PM

Redirect isn't really what you want, the mod_rewrite option is better.. Check out the manual: http://httpd.apache.org/docs/1.3/mod....html#redirect

chaze 08-16-2005 05:55 PM

Quote:

Originally Posted by vending_machine
If you have mod_rewrite, this should do it:

Code:

RewriteEngine on
RewriteRule ^/ http://www.eprosites.com/404.htm [R,L]


This should be fine for temp use, might kill your google listing though

Damian_Maxcash 08-16-2005 05:59 PM

Thanks... That should give me something to work with :)

mardigras 08-16-2005 06:43 PM

Here's what I use to redirect a specific page and 404 all others:

ErrorDocument 404 http://url

redirect 303 /index.html http://url


All times are GMT -7. The time now is 01:40 PM.

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