.htaccess http 404 error

Discussion in 'Apache' started by saudshah, Jun 25, 2010.

  1. #1
    hiya,

    i am having 404 server error, i cant figure out that whats left wrong in .htaccess.

    my web is www.chill.in

    and .htacccess is:

    RewriteEngine on
    
    RewriteBase /
    # if you installed facebook in a subdir use something like below and remove the line above
    #
    # RewriteBase /subdirectory/
    
    RewriteRule ^admin/$ index.php/admin/login/
    RewriteRule ^admin$ index.php/admin/login/
    
    RewriteCond $1 !^(index\.php|application/images|application/scripts|application/css|application/content|application/settings|favicon.ico)
    RewriteRule ^(.*)$ index.php/$1
    Code (markup):

     
    saudshah, Jun 25, 2010 IP
  2. Team-Allita-Inc.

    Team-Allita-Inc. Peon

    Messages:
    47
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Is your URL address www.chilly.in or www.chill.in?


    As HTTP error 404 is not found, and if you have an issue with the .htaccess will show a relay error instead 505 perhaps?

    Please check the address url, and if you really think the problem is with the .htaccess just type in again in your post thread
     
    Team-Allita-Inc., Jun 25, 2010 IP
  3. Team-Allita-Inc.

    Team-Allita-Inc. Peon

    Messages:
    47
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    You might want to try this attempt instead, but only if the previous didn;t work :rolleyes: and please back up the file before making changes to .htaccess


    
    RewriteEngine on
    
    RewriteCond %{HTTP_HOST} ^chill\.in$ [NC]
    RewriteRule ^(.*)$ http://www.chill.in/$1 [R=301,L]
    
    RewriteBase /
    
    # Change only if installed on not target default directory RewriteBase /subdirectory/
    
    RewriteRule ^admin/$ index.php/admin/login/
    RewriteRule ^admin$ index.php/admin/login/
    
    RewriteCond $1 !^(index\.php|application/images|application/scripts|application/css|application/content|application/settings|favicon.ico)
    RewriteRule ^(.*)$ index.php/$1
    Code (markup):
     
    Team-Allita-Inc., Jun 25, 2010 IP
  4. jeffatrackaid

    jeffatrackaid Active Member

    Messages:
    168
    Likes Received:
    1
    Best Answers:
    1
    Trophy Points:
    75
    #4
    I cannot say for sure since I do not know what application you are using, but I think you may need to change this:
    
    RewriteCond $1 !^(index\.php|application/images|application/scripts|application/css|application/content|application/settings|favicon.ico)
    RewriteRule ^(.*)$ index.php/$1
    
    Code (markup):
    to

    
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.*)$ /index.php/$1 [L]
    
    Code (markup):
    These rules say if the file or directory does not exist pass the reqeust to index.php/$ which is a common method for getting SEO friendly URLs for CMS tools.
     
    jeffatrackaid, Jun 25, 2010 IP
  5. saudshah

    saudshah Peon

    Messages:
    58
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #5
    its www.chill.in

     
    saudshah, Jun 25, 2010 IP
  6. saudshah

    saudshah Peon

    Messages:
    58
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #6
    saudshah, Jun 25, 2010 IP
  7. saudshah

    saudshah Peon

    Messages:
    58
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #7
    its not working

     
    saudshah, Jun 25, 2010 IP
  8. Team-Allita-Inc.

    Team-Allita-Inc. Peon

    Messages:
    47
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #8
    I can see its working now. Can you tell me what you have done to fix it?
     
    Team-Allita-Inc., Jun 25, 2010 IP
  9. saudshah

    saudshah Peon

    Messages:
    58
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #9
    bro it works only on home page now , but on register and lost password and other pages having same error 4040

     
    saudshah, Jun 25, 2010 IP
  10. Team-Allita-Inc.

    Team-Allita-Inc. Peon

    Messages:
    47
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #10
    thanks for the REP!
     
    Team-Allita-Inc., Jun 25, 2010 IP
  11. saudshah

    saudshah Peon

    Messages:
    58
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #11
    i have done what jeffatrackaid said but its working only on home page now =d
     
    saudshah, Jun 25, 2010 IP
  12. saudshah

    saudshah Peon

    Messages:
    58
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #12
    now all pages are working

    but having errors on header

    i changed my htaccess to:


    i added one ? after index.php in last line
     
    Last edited: Jun 25, 2010
    saudshah, Jun 25, 2010 IP