Forum Moderators: phranque

Message Too Old, No Replies

.htaccess file

         

matimer

8:37 pm on Jun 30, 2003 (gmt 0)

10+ Year Member



I login into the .htaccess file in my public html file, but it's empty is that normal?

and then all i have to do is this:

redirect 301 /old_1.html [domain.com...]

and it will forward my site? to the main domain?

graicas mis amigos

matt

jdMorgan

8:46 pm on Jun 30, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



matimer,

An empty .htaccess file is a normal thing for a default setup on a new account.

Your question is not at all clear. What are you trying to do?

Jim

matimer

9:34 pm on Jun 30, 2003 (gmt 0)

10+ Year Member



I have a file:

bob.html (the old file) and when someone attempts to go to that file i want them go to the next location of that file: bob.shtml

So using .htaccess how do I do that?

thanks

matt

keyplyr

1:22 am on Jul 1, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Try this:

Redirect 301 /old.html [your_domain.com...]

jdMorgan

1:35 am on Jul 1, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



matt,

The specifics I had in mind were:

  • Are both pages in the same domain?
  • Are both pages on the same server?
  • Are the two filenames different from each other?
  • Is this an Apache server?

    If all the answers are yes, then this will work:

    Redirect 301 /bob.html [your_domain.com...]

    Jim

  • tschild

    12:49 pm on Jul 1, 2003 (gmt 0)

    10+ Year Member




    ...
    • Are both pages in the same domain?
    • Are both pages on the same server?

    ...

    I don't think these two conditions are necessary here because what the server does here is a redirect (telling the browser to retrieve the content from another URL) rather than a rewrite (internally chosing another resource to serve to the browser). Redirect targets are not limited to the same server or domain.

    matimer

    3:44 pm on Jul 1, 2003 (gmt 0)

    10+ Year Member



    so bam... i just paste this into the blank .htaccess file

    Redirect 301 /bob.html [your_domain.com...]

    and wam bam thank you mam... it'll work?

    Also what's the recomendation on the main page redirection....

    redirect
    /index.html
    [domain.com...]

    to...

    [domain.com...]

    is that the best for google?