Jump to content

please help me with my .htaccess


orange08

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, [email protected] 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 [email protected]


# 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 [email protected]

 

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!

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.