ďťż

.htaccess problem z plikiem

       

Podstrony


telcocafe

Mój problem jest następujący: używam post-nuke i chciałem mieć krótkie linki, więc wgrałem na serwer plik .htaccess i po odżwieżeniu strony mam taki błąd:

Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator, tech@ovh.net 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.

--------------------------------------------------------------------------------

Apache/1.3.34 Server at www.serwismix.info Port 80

Napisałem do admina serwera, i odpowiedział, że przyczną może być źle napisany plik .htaccess, postanowiłem to sprawdzić, więc wgrałem na serwer pusty plik .htaccess i strona po odżwieżeniu działała normalnie. Oto zawartość pliku .htaccess potrzebnego do krótkich linków:
# Rename to .htacces for .html AutoURLs # # # CHTEKK # # LongiTEKK.com NETWORK Admin - chtekk@longitekk.com # MaxDev Devel - chtekk@maxdev.com # ENG # Place this file in your MD-Pro root directory, alongside the main index.php file # ITA # Inserisci questo file nella tua cartella principale di MD-Pro, assieme al file index.php principale # ENG # The "Options FollowSymLinks" line may be deleted, since on certain hosts it causes a config error! # ITA # La riga "Options FollowSymLinks" puň a volte essere eliminata, siccome causa errori di # configurazione su certi hosts! Options FollowSymLinks php_flag session.use_trans_sid off RewriteEngine On # Sample excluded directory #RewriteRule ^test/.*$ - [PT] # Don't process if not .html files #RewriteCond %{REQUEST_URI} !^.*\.html$ #RewriteRule ^.*$ - [PT] # ENG # This option is for use in Virtual Hosts or .htaccess files to inherit rewrite rules in the main section, # so if you have your own server you don't have to copy the rules into every Virtual Host you run. # Will cause an error if placed in the main httpd.conf section, as there's nothing to inherit. # ITA # Quest'opzione č per l'uso in Virtual Hosts o in file .htaccess per inserire le regole di riscrittura solo # nella sezione principale, cosě se possiedi un tuo server non dovrai copiare le regole di riscrittura in # ogni Virtual Host che hai. Causerŕ errori se viene inserita nella sezione principale dell'httpd.conf. # RewriteOptions 'inherit' # banners.php rewrite for new Banners System RewriteRule ^banners\.php$ index.php?module=Banners&func=clientlogin [L,NC,NS] # index.php and user.php RewriteRule ^changelang-([^-]+)\.html$ index.php?newlang=$1 [L,NC,NS] RewriteRule ^changetheme-([^-]+)\.html$ index.php?theme=$1 [L,NC,NS] RewriteRule ^index\.html$ index.php [L,NC,NS] RewriteRule ^user\.html$ user.php [L,NC,NS] # ppnews RewriteRule ^ppnews-index\.html$ index.php?module=ppnews&choix=index [L,NC,NS] RewriteRule ^ppnews-([^-]+)\.html$ index.php?module=ppnews&choix=$1 [L,NC,NS] # My_eGallery RewriteRule ^MeG-([^-]+)\.html$ index.php?module=My_eGallery&do=$1 [L,NC,NS] RewriteRule ^MeG-([^-]+)-([^-]+)-([^-]+)\.html$ index.php?module=My_eGallery&do=$1&$2=$3 [L,NC,NS] RewriteRule ^MeG-([^-]+)-([^-]+)-([^-]+)-([^-]+)- ([^-]+)\.html$ index.php?module=My_eGallery&do=$1&$2=$3&$4=$5 [L,NC,NS] RewriteRule ^MeG-([^-]+)-([^-]+)-([^-]+)-([^-]+)- ([^-]+)-([^-]+)-([^-]+)\.html$ index.php?module=My_eGallery&do=$1&$2=$3&$4=$5&$6=$ 7 [L,NC,NS] # NS-User_Points RewriteRule ^User_Points\.html$ modules.php?op=modload&name=NS-User_Points&file=index [L,NC,NS] # NS-Link_To_Us RewriteRule ^Link_To_Us\.html$ modules.php?op=modload&name=NS-Link_To_Us&file=index [L,NC,NS] # Polls / Sondaggi RewriteRule ^Poll-([0-9]{1,3})([A-Za-z]*)?\.html$ modules.php?op=modload&name=NS-Polls&file=index&req=$2&pollID=$1 [L,NC,NS] RewriteRule ^Polls\.html$ modules.php?op=modload&name=NS-Polls&file=index [L,NC,NS] # Private Messages / Messaggi Privati RewriteRule ^Messages-outbox\.html$ modules.php?op=modload&name=Messages&file=outbox [L,NC,NS] RewriteRule ^Messages-inbox\.html$ modules.php?op=modload&name=Messages&file=index [L,NC,NS] # Search functions (by user and by topic) / Funzioni di ricerca (per utente e per argomento) RewriteRule ^Search-author-([^-]+)\.html$ modules.php?op=modload&name=Search&file=index&action=search&overview=1&active_stories=1& stories_author=$1 [L,NC,NS] RewriteRule ^Search-topics-([^-]+)\.html$ modules.php?op=modload&name=Search&file=index&action=search&overview=1&active_stories=1& stories_topics[0]=$1 [L,NC,NS] RewriteRule ^Search-author-([^-]+)-no\.html$ modules.php?op=modload&name=Search&file=index&action=search&active_stories=1&stories_author=$ 1 [L,NC,NS] RewriteRule ^Search-topics-([^-]+)-no\.html$ modules.php?op=modload&name=Search&file=index&action=search&active_stories=1&stories_topics[ 0]=$1 [L,NC,NS] # daily_archive RewriteRule ^daily_archive-([^-]+)\.html$ index.php?module=daily_archive&func=$1 [L,NC,NS] RewriteRule ^daily_archive-([^-]+)-([^-]+)\.html$ index.php?module=daily_archive&func=display&req=get&year=$1&month=$2 [L,NC,NS] RewriteRule ^daily_archive-([^-]+)-([^-]+)-([^-]+)\.html$ index.php?module=daily_archive&func=display&req=get&year=$1&month=$2&day=$ 3 [L,NC,NS] RewriteRule ^daily_archive-([^-]+)-([^-]+)-([^-]+)-([^-] +)\.html$ index.php?module=daily_archive&func=display&req=get&year=$1&month=$2&day=$ 3&page=$4 [L,NC,NS] # News Extension / Estensione News RewriteRule ^News-hometopicmore-([0-9]+)\.html$ modules.php?op=modload&name=News&file=index&catid=&topic=&startrow=$1 [L,NC,NS] RewriteRule ^News-topicmore-([0-9]+)-([0-9]+)\.html$ modules.php?op=modload&name=News&file=index&catid=&topic=$1&startrow=$2 [L,NC,NS] # PostCalendar RewriteRule ^PostCalendar-([0-9]{2})-([0-9]{2})-([0-9]{4})-event- ([0-9]+)\.html$ index.php?module=PostCalendar&func=view&Date=$3$2$1&tplview=&viewtype=details& eid=$4&print= [L,NC,NS] RewriteRule ^PostCalendar-([0-9]{2})-([0-9]{2})-([0-9]{4})\. html$ index.php?module=PostCalendar&func=view&tplview=default&viewtype=month&Date=$3$ 2$1 [L,NC,NS] RewriteRule ^PostCalendar-([0-9]{2})-([0-9]{2})-([0-9]{4})-([ A-Za-z]+)-([^-\.]+)\.html$ index.php?module=PostCalendar&func=view&tplview=$5&viewtype=$4&Date=$3$ 2$1&pc_username=&pc_category=&pc_topic=&print= [L,NC,NS] RewriteRule ^PostCalendar-([0-9]{2})-([0-9]{2})-([0-9]{4})-([ A-Za-z]+)\.html$ index.php?module=PostCalendar&func=view&tplview=&viewtype=$4&Date=$3$2$ 1&pc_username=&pc_category=&pc_topic=&print= [L,NC,NS] RewriteRule ^PostCalendar-([A-Za-z]+)\.html$ index.php?module=PostCalendar&func=$1 [L,NC,NS] # Articles / Articoli RewriteRule ^Article([0-9]+)\.html$ modules.php?op=modload&name=News&file=article&sid=$1&mode=thread&order=0& thold=0 [L,NC,NS] RewriteRule ^Article([0-9]+)-([A-Za-z=]+)(-order([0-9]))? (-threshold([0-9\-]{1,2}))?\.html$ modules.php?op=modload&name=News&file=article&sid=$1&mode=$2&order=$ 4&thold=$6 [L,NC,NS] # Recommend us to a friend / Raccomandaci ad un amico RewriteRule ^SendArticle([0-9]+)\.html$ modules.php?op=modload&name=Recommend_Us&file=index&req=FriendSend&sid=$1 [L,NC,NS] # Sections / Sezioni RewriteRule ^Section-([0-9]+)\.html$ modules.php?op=modload&name=Sections&file=index&req=listarticles&secid=$1 [L,NC,NS] RewriteRule ^Sections-article([0-9]+)(-p([0-9]*))?\.html$ modules.php?op=modload&name=Sections&file=index&req=viewarticle&artid=$1&page=$ 3 [L,NC,NS] # Print article / Stampa un articolo RewriteRule ^PrintArticle([0-9]+)\.html$ print.php?sid=$1 [L,NC,NS] # Categories / Categorie RewriteRule ^Category([0-9]+)\.html$ index.php?catid=$1 [L,NC,NS] RewriteRule ^Category([0-9]+)-All\.html$ modules.php?op=modload&name=News&file=index&catid=$1&allstories=1 [L,NC,NS] # Topics / Argomenti RewriteRule ^Topic([0-9]+)\.html$ modules.php?op=modload&name=News&file=index&catid=&topic=$1 [L,NC,NS] RewriteRule ^Topic([0-9]+)all\.html$ modules.php?op=modload&name=News&file=index&catid=&topic=$1&allstories=1 [L,NC,NS] # FAQ RewriteRule ^FAQ-Category([0-9]+)-([^-]+)-Parent([0-9]+)-myfaq-( [^-\.]+).html$ modules.php?op=modload&name=FAQ&file=index&myfaq=$4&id_cat=$1&categories=$ 2&parent_id=$3 [L,NC,NS] # Rules for PNphpBB2 / Regole per PNphpBB2 RewriteRule ^PNphpBB2\.html$ index.php?name=PNphpBB2&file=index [L,NC,NS] RewriteRule ^PNphpBB2-([^-]+)\.html$ index.php?name=PNphpBB2&file=$1 [L,NC,NS] RewriteRule ^PNphpBB2-([^-]+)-([^-]+)-([^-]+)\.html$ index.php?name=PNphpBB2&file=$1&$2=$3 [L,NC,NS] RewriteRule ^PNphpBB2-([^-]+)-([^-]+)-([^-]+)-([^-]+) -([^-]+)\.html$ index.php?name=PNphpBB2&file=$1&$2=$3&$4=$5 [L,NC,NS] RewriteRule ^PNphpBB2-([^-]+)-([^-]+)-([^-]+)-([^-]+) -([^-]+)-([^-]+)-([^-]+)\.html$ index.php?name=PNphpBB2&file=$1&$2=$3&$4=$5&$6=$7 [L,NC,NS] RewriteRule ^PNphpBB2-([^-]+)-([^-]+)-([^-]+)-([^-]+) -([^-]+)-([^-]+)-([^-]+)-([^-]+)-( [^-]+)\.html$ index.php?name=PNphpBB2&file=$1&$2=$3&$4=$5&$6=$7& $8=$9 [L,NC,NS] # User related URLs / URL relative agli utenti RewriteRule ^UserInfo-([^-]+)\.html$ user.php?op=userinfo&uname=$1 [L,NC,NS] RewriteRule ^UserReg\.html$ user.php?op=register&module=NS-NewUser [L,NC,NS] RewriteRule ^UserReg-CheckAge\.html$ user.php?op=check_age&module=NS-NewUser [L,NC,NS] RewriteRule ^User-Login\.html$ user.php?op=loginscreen&module=NS-User [L,NC,NS] RewriteRule ^User-LostPassword\.html$ user.php?op=lostpassscreen&module=NS-LostPassword [L,NC,NS] RewriteRule ^User-Logout\.html$ user.php?module=NS-User&op=logout [L,NC,NS] # General rules for modules with index.php?name=... / Regole generali per moduli con index.php?name=... RewriteRule ^name-([^-]+)\.html$ index.php?name=$1&file=index [L,NC,NS] RewriteRule ^name-([^-]+)-([^-]+)\.html$ index.php?name=$1&file=$2 [L,NC,NS] RewriteRule ^name-([^-]+)-([^-]+)-([^-]+)-([^-]+) \.html$ index.php?name=$1&file=$2&$3=$4 [L,NC,NS] RewriteRule ^name-([^-]+)-([^-]+)-([^-]+)-([^-]+) -([^-]+)-([^-]+)\.html$ index.php?name=$1&file=$2&$3=$4&$5=$6 [L,NC,NS] RewriteRule ^name-([^-]+)-([^-]+)-([^-]+)-([^-]+) -([^-]+)-([^-]+)-([^-]+)-([^-]+)\ .html$ index.php?name=$1&file=$2&$3=$4&$5=$6&$7=$8 [L,NC,NS] RewriteRule ^name-([^-]+)-([^-]+)-([^-]+)-([^-]+) -([^-]+)-([^-]+)-([^-]+)-([^-]+)-( [^-]+)-([^-]+)\.html$ index.php?name=$1&file=$2&$3=$4&$5=$6&$7=$8& $9=$10 [L,NC,NS] # General rules for modules with index.php?module=... / Regole generali per moduli con index.php?module=... RewriteRule ^module-([^-]+)\.html$ index.php?module=$1&func=main [L,NC,NS] RewriteRule ^module-([^-]+)-([^-]+)\.html$ index.php?module=$1&func=$2 [L,NC,NS] RewriteRule ^module-([^-]+)-([^-]+)-([^-]+)-([^-]+) \.html$ index.php?module=$1&func=$2&$3=$4 [L,NC,NS] RewriteRule ^module-([^-]+)-([^-]+)-([^-]+)-([^-]+) -([^-]+)-([^-]+)\.html$ index.php?module=$1&func=$2&$3=$4&$5=$6 [L,NC,NS] RewriteRule ^module-([^-]+)-([^-]+)-([^-]+)-([^-]+) -([^-]+)-([^-]+)-([^-]+)-([^-]+)\ .html$ index.php?module=$1&func=$2&$3=$4&$5=$6&$7=$8 [L,NC,NS] RewriteRule ^module-([^-]+)-([^-]+)-([^-]+)-([^-]+) -([^-]+)-([^-]+)-([^-]+)-([^-]+)-( [^-]+)-([^-]+)\.html$ index.php?module=$1&func=$2&$3=$4&$5=$6&$7=$8& $9=$10 [L,NC,NS] # General rules for modules with modules.php?op=modload&name=...&file=... / Regole generali per modules.php?op=modload&name=...&file=... RewriteRule ^([^-]+)\+([^-]+)\.html$ modules.php?op=modload&name=$1&file=index&req=$2 [L,NC,NS] RewriteRule ^([^-]+)\.html$ modules.php?op=modload&name=$1&file=index [L,NC,NS] RewriteRule ^([^-]+)-([^-]+)\.html$ modules.php?op=modload&name=$1&file=$2 [L,NC,NS] RewriteRule ^([^-]+)-([^-]+)-([^-]+)-([^-]+)\ .html$ modules.php?op=modload&name=$1&file=$2&$3=$4 [L,NC,NS] RewriteRule ^([^-]+)-([^-]+)-([^-]+)-([^-]+)-( [^-]+)-([^-]+)\.html$ modules.php?op=modload&name=$1&file=$2&$3=$4&$5=$6 [L,NC,NS] RewriteRule ^([^-]+)-([^-]+)-([^-]+)-([^-]+)-( [^-]+)-([^-]+)-([^-]+)-([^-]+)\.html$ modules.php?op=modload&name=$1&file=$2&$3=$4&$5=$6& $7=$8 [L,NC,NS] RewriteRule ^([^-]+)-([^-]+)-([^-]+)-([^-]+)-( [^-]+)-([^-]+)-([^-]+)-([^-]+)-([^- ]+)-([^-]+)\.html$ modules.php?op=modload&name=$1&file=$2&$3=$4&$5=$6& $7=$8&$9=$10 [L,NC,NS]

Jest on źle napisany? Pozdrawiam.



a czy ten server obsluguje mod rewrite ?:>

Tak, serwer obsługuje mod rwerite. Konto mam na ovh. POMÓŻCIE!

weź ten kod krócej :[



Problem rozwiązany. Podam rozwiązanie na przykładzie. Mamy np.
RewriteRule ^index\.html$ index.php [L,NC,NS]
i musimy zamienić na:
RewriteRule ^index\.html$ \index.php [L,NC,NS] - oto cała filozofia:P

  • zanotowane.pl
  • doc.pisz.pl
  • pdf.pisz.pl
  • nvm.keep.pl

  • Sitedesign by AltusUmbrae.