.htaccess configuration

Discussion in 'HTML & Website Design' started by Nathan Mclean, Nov 16, 2013.

  1. #1
    Hi guys,

    I have a new site and it doesn't yet have a .htaccess file.

    As far as I am aware I just open a txt file and input my codes then save as .htaccess and upload is this correct?

    Beyond that I would like all 404 pages to re-direct to the home page. Also I would like the naked url to redirect to www.

    Can you give me any help possible please?

    Thanks
     
    Nathan Mclean, Nov 16, 2013 IP
  2. Praveenkumar1

    Praveenkumar1 Greenhorn

    Messages:
    12
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    21
    #2
    This is Example for .htaccess.Try This

    #format
    php_value setting_name setting_value

    #example
    php_value upload_max_filesize 10M

    you could simply place these in the .htaccess file and save it.
     
    Praveenkumar1, Nov 18, 2013 IP
  3. danramosd

    danramosd Active Member

    Messages:
    115
    Likes Received:
    1
    Best Answers:
    1
    Trophy Points:
    83
    #3
    Assuming your apache config allows for .htaccess then you are correct. In the root directory of your website create a .htaccess file and add the following:
    ErrorDocument 404 /index.php

    This assumes that your index page is index.php. You may want to replace this with /index.html, /index, or just /.
     
    danramosd, Nov 20, 2013 IP