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

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

Resellers.co.il 09-10-12 14:33

עזרה HTACCESS
 
אני רוצה שאם מישהו יכנס נגיד ל games.html
זה יתן את המידע מ page.php?page=games,
אני רושם את הקוד הזה:

RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^([a-zA-Z0-9 %_-]+) page.php?page=$1 [L,NC,QSA]

וזה עושה לי שגיאה בכל האתר
(אני עובד עם ה WAMP):

Internal Server Error

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

Please contact the server administrator, admin@localhost 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.

Haimz 09-10-12 14:46

נסה:
קוד:

RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^([a-zA-Z0-9 %_-]+)\.html$ page.php?page=$1

בסמל של הWAMP למטה, תן קליק ימני, ואז תפעיל את הrewrite mode משהו כזה, תדאג שיהיה לו V בצד שמאל.. זה אמור להיות בתוך הAPACHE או משהו..

Resellers.co.il 09-10-12 14:51

אוקי, עכשיו שנאי ניכנס זה עושה לי שגיאה 404,
שאני ניכנס ל 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@introx-serv.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.

Haimz 09-10-12 14:53

אולי:
קוד:

RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^([a-zA-Z0-9_]+?)\.html$ page.php?page=$1


Resellers.co.il 09-10-12 14:54

עובד תודה רבה.


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

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