הוסטס - פורום אחסון האתרים הגדול בישראל

הוסטס - פורום אחסון האתרים הגדול בישראל (https://hosts.co.il/forums/index.php)
-   פורום תיכנות (https://hosts.co.il/forums/forumdisplay.php?f=14)
-   -   השרת מחזיר שגיאה בגלל קובץ Htaccess (https://hosts.co.il/forums/showthread.php?t=73650)

Shillo 16-04-09 15:32

השרת מחזיר שגיאה בגלל קובץ Htaccess
 
אהלן,
התוכנה שאיתה אני מפעיל כביכול את השרת הביתי היא XAMPP.
בכל מקרה, אני עובד על איזה משהו עם המערכת ג'ומלה וברגע שאני שם בתיקייה קובץ .htaccess, לא משנה לאיזה קובץ אני נכנס, הוא מחזיר לי את השגיאה הזו:

ציטוט:

Server error!

The server encountered an internal error and was unable to complete your request. Either the server is overloaded or there was an error in a CGI script.

If you think this is a server error, please contact the webmaster.
Error 500
localhost
04/16/09 16:30:07
Apache/2.2.9 (Win32) DAV/2 mod_ssl/2.2.9 OpenSSL/0.9.8i mod_autoindex_color PHP/5.2.6
חיפשתי בגוגל, גם מה שמצאתי לא כ"כ עזר לי.
לפי דעתי, צריך לשנות משהו באיזשהו קובץ הגדרות של התוכנה שמפעילה את השרת.
אשמח לעזרה, תודה.

אדיר 17-04-09 01:26

קובץ ה- .htaccess שלך מכיל משהו או שהוא ריק?
במידה והוא מכיל משהו, תרשום אותו פה.

Shillo 17-04-09 11:14

ציטוט:

##
# @version $Id: htaccess.txt 10492 2008-07-02 06:38:28Z ircmaxell $
# @package Joomla
# @copyright Copyright (C) 2005 - 2008 Open Source Matters. All rights reserved.
# @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
# Joomla! is Free Software
##


################################################## ###
# READ THIS COMPLETELY IF YOU CHOOSE TO USE THIS FILE
#
# The line just below this section: 'Options +FollowSymLinks' may cause problems
# with some server configurations. It is required for use of mod_rewrite, but may already
# be set by your server administrator in a way that dissallows changing it in
# your .htaccess file. If using it causes your server to error out, comment it out (add # to
# beginning of line), reload your site in your browser and test your sef url's. If they work,
# it has been set by your server administrator and you do not need it set here.
#
################################################## ###

## Can be commented out if causes errors, see notes above.
Options +FollowSymLinks

#
# mod_rewrite in use

RewriteEngine On

########## Begin - Rewrite rules to block out some common exploits
## If you experience problems on your site block out the operations listed below
## This attempts to block the most common type of exploit `attempts` to Joomla!
#
# Block out any script trying to set a mosConfig value through the URL
RewriteCond %{QUERY_STRING} mosConfig_[a-zA-Z_]{1,21}(=|\%3D) [OR]
# Block out any script trying to base64_encode crap to send via URL
RewriteCond %{QUERY_STRING} base64_encode.*\(.*\) [OR]
# Block out any script that includes a <script> tag in URL
RewriteCond %{QUERY_STRING} (\<|%3C).*script.*(\>|%3E) [NC,OR]
# Block out any script trying to set a PHP GLOBALS variable via URL
RewriteCond %{QUERY_STRING} GLOBALS(=|\[|\%[0-9A-Z]{0,2}) [OR]
# Block out any script trying to modify a _REQUEST variable via URL
RewriteCond %{QUERY_STRING} _REQUEST(=|\[|\%[0-9A-Z]{0,2})
# Send all blocked request to homepage with 403 Forbidden error!
RewriteRule ^(.*)$ index.php [F,L]
#
########## End - Rewrite rules to block out some common exploits

# Uncomment following line if your webserver's URL
# is not directly related to physical file paths.
# Update Your Joomla! Directory (just / for root)

# RewriteBase /


########## Begin - Joomla! core SEF Section
#
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !^/index.php
RewriteCond %{REQUEST_URI} (/|\.php|\.html|\.htm|\.feed|\.pdf|\.raw|/[^.]*)$ [NC]
RewriteRule (.*) index.php
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization},L]
#
########## End - Joomla! core SEF Section

הנה, הקובץ בא עם המערכת ג'ומלה.

OrPol 17-04-09 12:34

להבא שים לב היכן אתה מפרסם את האשכולות שלך,
מועבר.

vadimg88 17-04-09 12:43

תבדוק אם mod_rewrite פעיל על השרת

Shillo 17-04-09 13:13

אוקיי, זה מה שאני ניסיתי לחפש גם, הרצתי את הקובץ phpinfo.php והרצתי גם חיפוש בקובץ והוא לא מראה שום mod_rewrite, יש דרך אחרת לבדוק?

אדיר 17-04-09 13:28

תיצור קובץ .htaccess חדש ותשים בו רק את זה:
קוד:

RewriteEngine On
עריכה:
לפי מה שאני רואה אצלי ב- XAMPP, המודול הזה לא נכלל כברירת מחדל (הוא קיים בתקייה אבל).
תכנס לתקייה את ה- xampp, תכנס לתקייה apache ואז ל- conf.
תפתח את הקובץ httpd.conf ותמצא את השורה:
קוד:

#LoadModule rewrite_module modules/mod_rewrite.so
תוריד את ה- #, תשמור ותעשה ריסטרט ל- Apache.

עכשיו זה אמור לעבוד.

בניה 17-04-09 14:24

תסתכל ב error log של האפאצ'י, זה יתן יותר פירוט על השגיאה.
וכמו שכבר אמרו, יש מצב שזה בגלל שבכלל ההרחבה של mod_rewrite לא טעונה בapache

Shillo 17-04-09 15:27

ציטוט:

נכתב במקור על ידי xPerfection (פרסם 709462)
תיצור קובץ .htaccess חדש ותשים בו רק את זה:
קוד:

RewriteEngine On
עריכה:
לפי מה שאני רואה אצלי ב- XAMPP, המודול הזה לא נכלל כברירת מחדל (הוא קיים בתקייה אבל).
תכנס לתקייה את ה- xampp, תכנס לתקייה apache ואז ל- conf.
תפתח את הקובץ httpd.conf ותמצא את השורה:
קוד:

#LoadModule rewrite_module modules/mod_rewrite.so
תוריד את ה- #, תשמור ותעשה ריסטרט ל- Apache.

עכשיו זה אמור לעבוד.

ממש תודה לך, זה הקובץ שחיפשתי.

תודה גם לשאר שעזרו. :-)


כל הזמנים הם GMT +2. הזמן כעת הוא 17:45.

מופעל באמצעות VBulletin גרסה 3.8.6
כל הזכויות שמורות ©
כל הזכויות שמורות לסולל יבוא ורשתות (1997) בע"מ