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

הוסטס - פורום אחסון האתרים הגדול בישראל (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=64967)

ShLooK 08-07-08 18:53

בעיה עם .htaccess
 
תראו יש לי את הקוד הבא:
קוד:

Options +FollowSymLinks
Options +Indexes
RewriteEngine On
RewriteRule index.php index.html

מה שרציתי לעשות זה בעצם שכאשר נכנסים ל index.html זה יהיה index.php
ואז שאני נכנס ל index.html, יש לי את הבעיה הבאה:
קוד:

Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator, webmaster@***co.il 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 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.

מה אני אמור לעשות? תודה!

Kfir.G 08-07-08 19:00

הפוך

Options +FollowSymLinks
Options +Indexes
RewriteEngine On
RewriteRule index.html index.php
בהנחה שתרצה לעשות את זה לכלל הקבצים שלך

Options +FollowSymLinks
Options +Indexes
RewriteEngine On
RewriteRule (.*)\.html $1.php
מקווה שעזרתי,
כפיר

ShLooK 08-07-08 19:13

עדיין אותה בעיה...

AlmogBaku 08-07-08 21:19

לא סימנת [R]

ShLooK 08-07-08 21:40

מה זה אומר?

MusicMan 08-07-08 21:56

לא מבין בזה בככל אבל כנראה ש [R] זה רידיירקט- הפנייה אז תעשה [R=301]
או [301]

ShLooK 08-07-08 22:22

איפה לשים את זה?

AlmogBaku 08-07-08 23:02

תיקון, יש לשים את המוד L

דוגמא:
PHP קוד:


<IfModule mod_rewrite.c>
    
RewriteEngine On
    RewriteBase 
/
    
RewriteCond &#37;{REQUEST_FILENAME} !-f
    
RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule 
^(.+)/?$ index.php?link=$[L]
</
IfModule


BlueNosE 08-07-08 23:54

לא מומלץ לשים את השורה RewriteBase /, תיצור בעיות בהנחה שזה לא ROOT PATH.

AlmogBaku 08-07-08 23:58

ברור, זו רק דוגמא, הסרתי את הכתובת שאצלי.


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

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