Quick htaccess question

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Damian_Maxcash
    So Fucking Banned
    • Oct 2002
    • 12745

    #1

    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
  • monaro
    Confirmed User
    • Aug 2003
    • 968

    #2
    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]

    Comment

    • jimmyf
      OU812
      • Feb 2001
      • 12651

      #3
      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.
      Epic CashEpic Cash works for me
      Solar Cash Paysite Plugin
      Gallery of the day freesites,POTD,Gallery generator with free hosting

      Comment

      • vending_machine
        Confirmed User
        • Jun 2002
        • 1070

        #4
        If you have mod_rewrite, this should do it:

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

        Comment

        • vending_machine
          Confirmed User
          • Jun 2002
          • 1070

          #5
          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

          Comment

          • chaze
            Confirmed User
            • Aug 2002
            • 9774

            #6
            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
            Like the desert needs the rain
            We do fully manged WordPress, VPS, and Servers. Adult Host Pro https://adulthostpro.com/ Since 2001

            Comment

            • Damian_Maxcash
              So Fucking Banned
              • Oct 2002
              • 12745

              #7
              Thanks... That should give me something to work with

              Comment

              • mardigras
                Bon temps!
                • Feb 2003
                • 14194

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

                ErrorDocument 404 http://url

                redirect 303 /index.html http://url
                .

                Comment

                Working...