The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

.htaccess >> ??

Discussion in 'General Discussion' started by mahdionline, Jun 24, 2004.

  1. mahdionline

    mahdionline Well-Known Member

    Joined:
    Oct 18, 2003
    Messages:
    127
    Likes Received:
    0
    Trophy Points:
    16
    Hi
    I have two question :

    1- what is the main work of .htaccess file ?

    2- how i can use (Alias directive in .htaccess?)
    I want to redirect one php file directly to another location of hard!


    Regard
     
  2. anand

    anand Well-Known Member

    Joined:
    Nov 11, 2002
    Messages:
    1,435
    Likes Received:
    1
    Trophy Points:
    38
    Location:
    India
    cPanel Access Level:
    DataCenter Provider
  3. mahdionline

    mahdionline Well-Known Member

    Joined:
    Oct 18, 2003
    Messages:
    127
    Likes Received:
    0
    Trophy Points:
    16
    Thanks sir,

    but redirect is not a php command. please describe me more!

    Regard
     
  4. PWSowner

    PWSowner Well-Known Member

    Joined:
    Nov 10, 2001
    Messages:
    2,948
    Likes Received:
    3
    Trophy Points:
    38
    Location:
    ON, Canada
    In the .htaccess file you put:

    Redirect old.file new.file

    and anyone going to whatever file name you put first will be sent to the one you put second. That's assuming both files, and the .htaccess file, are in the same directory. If the files are in different directories, it would be:

    Redirect directory1/old.file directory2/new.file
     
Loading...

Share This Page