![]() |
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 |
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] |
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. |
If you have mod_rewrite, this should do it:
Code:
RewriteEngine on |
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
|
Quote:
|
Thanks... That should give me something to work with :)
|
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