Jump to content

Recommended Posts

after research and read online, i try to come out my .htaccess...but, what i get is

Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator, webmaster@mysite.com and inform them of the time the error occurred, and anything you might have done that may have caused the error.

More information about this error may be available in the server error log.

Additionally, a 500 Internal Server Error error was encountered while trying to use an ErrorDocument to handle the request.
Apache/2 Server at www.mysite.com Port 80

 

this is my .htaccess

 

Options -Indexes

php_flag display_errors off
php_flag error_reporting 8191
php_flag log_errors on
php_flag error_log /home/mysite/logs/php_errors.log

RewriteEngine on
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://(www\.)?mysite.com/.*$ [NC]
RewriteRule .(gif|jpg)$ - [F]

ServerAdmin webmaster@mysite.com


# YEAR
<FilesMatch "\.(flv|gif|jpg|jpeg|png|ico)$">
  Header set Cache-Control "max-age=2592000"
</FilesMatch>
# WEEK
<FilesMatch "\.(js|css|pdf|swf)$">
  Header set Cache-Control "max-age=604800"
</FilesMatch>
# 10 minutes
<FilesMatch "\.(html|htm|txt)$">
  Header set Cache-Control "max-age=600"
</FilesMatch>
# DONT CACHE
<FilesMatch "\.(pl|php|cgi|spl|scgi|fcgi)$">
  Header unset Cache-Control
</FilesMatch>

<Files .htaccess>
order allow,deny
deny from all
</Files>

Link to comment
https://forums.phpfreaks.com/topic/161368-please-help-me-with-my-htaccess/
Share on other sites

To understand why you are getting an Internal Server Error message you should check Apaches error log. Post the errors in your error log here.

 

now, i know that it's

ServerAdmin webmaster@mysite.com

 

create the error...

 

but, i have another question regarding this .htaccess...

 

with

php_flag error_log /home/mysite/logs/php_errors.log

 

i would like to know that the above code will automatically create logs folder and php_errors.log file or not? or i need to manually create the folder and file in my hosting directory?

 

thanks!

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.