Results 1 to 3 of 3

Thread: .htaccess help (using httpd cgi)

  1. #1
    Junior Member
    Join Date
    Jun 2008
    Posts
    33

    Default .htaccess help (using httpd cgi)

    I started the apache server by going to KMenu > Services > HTTPD > Start HTTPD CGI (or something close to it). It start successfully and says the root is at /var/www/htdocs/. What I need to do is to make a .htaccess file that redirects all pages and 404 errors to the index.html page, with this code:

    ErrorDocument 404 /index.html
    redirect / /index.html

    The only problem is that I can't seem to get the .htaccess file to work. It doesn't show up in the browser, or when using ls to list the files, but I know it's there because if I nano /var/www/htdocs/.htaccess, I can view it and edit it.

    I think I might be putting it in the wrong spot, (obviously it's in the /var/ww/htdocs/ folder right now). Any help is welcome, thanks.

  2. #2
    Member wick86's Avatar
    Join Date
    Mar 2010
    Posts
    113

    Default

    Quote Originally Posted by devilsson2010 View Post
    I started the apache server by going to KMenu > Services > HTTPD > Start HTTPD CGI (or something close to it). It start successfully and says the root is at /var/www/htdocs/. What I need to do is to make a .htaccess file that redirects all pages and 404 errors to the index.html page, with this code:

    ErrorDocument 404 /index.html
    redirect / /index.html

    The only problem is that I can't seem to get the .htaccess file to work. It doesn't show up in the browser, or when using ls to list the files, but I know it's there because if I nano /var/www/htdocs/.htaccess, I can view it and edit it.

    I think I might be putting it in the wrong spot, (obviously it's in the /var/ww/htdocs/ folder right now). Any help is welcome, thanks.
    .htaccess is a hidden file thats what the . is for try ls -a

  3. #3
    Junior Member
    Join Date
    Jun 2008
    Posts
    33

    Default

    Quote Originally Posted by wick86 View Post
    .htaccess is a hidden file thats what the . is for try ls -a
    Much better , but any tips for the whole not-working part of it?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •