Jump to content

Recommended Posts

I get a internal server error when trying to access my website. But if I delete my .htaccess file I can access the site but the images don't display. Can anyone help? here is the .htaccess file:

 

# $Id: .htaccess 

<IfModule mod_rewrite.c>
  Options +FollowSymLinks
  RewriteEngine On

  # Get rid of index.php
  RewriteCond %{REQUEST_URI} /index\.php
  RewriteRule (.*) index.php?rewrite=2 [L,QSA]

  # Rewrite all directory-looking urls
  RewriteCond %{REQUEST_URI} /$
  RewriteRule (.*) index.php?rewrite=1 [L,QSA]

  # Try to route missing files
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteCond %{REQUEST_FILENAME} public\/ [OR]
  RewriteCond %{REQUEST_FILENAME} \.(jpg|gif|png|ico|flv|htm|html|php|css|js)$
  RewriteRule . - [L]
  
  # If the file doesn't exist, rewrite to index
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteRule ^(.*)$ index.php?rewrite=1 [L,QSA]

</IfModule>

# sends requests /index.php/path/to/module/ to "index.php"
# AcceptPathInfo On

# @todo This may not be effective in some cases
FileETag Size

Link to comment
https://forums.phpfreaks.com/topic/240665-internal-server-error/
Share on other sites

ok now i got the website to work be removing this line " Options +FollowSymLinks" and i had to delete another .htaccess file for the website to display the theme, but now images dont display such as the profile image etc..

 

this is the .htaccess i deleted

 

# $Id: .htaccess 

deny from all
<Files ~ "index.php|css.php|mobile.php|lite.php|offline.html|maintenance.html">
    order allow,deny
    allow from all
</Files>

<FilesMatch "\.(avi|flv|mov|wmv|wma|mp3|mp4|m4a|mkv|swf|pdf|doc|ppt|ico|jpg|jpeg|png|gif|js|css)$">
  <IfModule mod_expires.c>
    ExpiresActive On
    ExpiresDefault A29030400
    <IfModule mod_headers.c>
      Header append Cache-Control "public"
    </IfModule>
  </IfModule>
  <IfModule !mod_expires.c>
    <IfModule mod_headers.c>
        Header set Expires "Sun, 1 Jan 2012 00:00:00 GMT"
        Header append Cache-Control "max-age=172800, public"
    </IfModule>
  </IfModule>
</FilesMatch>

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.