Mod_rewrite?

purko

Registered
Код:
  url.rewrite-once = (
   "^/(.*)?/?files/$" => "index.php",
   "^/(.*)?/?files/(.*)" => "wp-content/blogs.php?file=$2",
   "^/(wp-.*)$" => "$1",
   "^/([_0-9a-zA-Z-]+/)?(wp-.*)" => "$2",
   "^/([_0-9a-zA-Z-]+/)?(.*\.php)$" => "$2",
   "(\?.*)$" => "index.php$1",
   "." => "index.php"
  )
Ползвам това - обаче ми дава
Internal Server Error

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

Please contact the server administrator, webmaster@forum.ogun.eu 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.
Хоста ми е на суперхостинг. Включен ли е mod-a или трябва да им пиша да го включат?
 
А прочете ли че това няма нищо общо с апач а е за lighttpd сървър? :)
За какво ти трява rewrite?
Разликата е огромна, а и не вярвам да са писали че е за апаче тези от където си го взел
 
За да го подкараш на апчи, просто трябва да го направиш така:

#този ред го слагаш веднъж!
RewriteEngine On

#тук заместваш
# От това "^/(.*)?/?files/$" => "index.php"
# Ще стане това:
RewriteRule ^/(.*)?/?files/$ index.php [L] #L- е за да не се изпълняват други правила по-надолу
Ето едно доста полезно нещо, което да използваш! -> http://www.addedbytes.com/cheat-sheets/mod_rewrite-cheat-sheet/
:)
Off:// А някой знае ли, защо се различават начините на използване на mod rewrite под различни сървъри (apache, nginx, lighttpd) ?
 

Back
Горе