Pomoc - Szukaj - Użytkownicy - Kalendarz
Pełna wersja: mod_rewrite i TinyMCE
Forum PHP.pl > Forum > Po stronie przeglądarki
Savage.Mephisto
Mam problem z edytorem TinyMCE w panelu administracyjnym. Po operacji SEO friendly przy użyciu mod_rewrite edytor wyświetla 'znaczniki' zamiast tekstu. Niepożądany efekt można zobaczyć na załączonym poniżej zdjęciu:



Ponadto niemożliwe stało się korzystanie z niektórych pluginów, np. wstawianie obrazka.

W pliku .htaccess mam m.in. taki wpis:

Kod
RewriteRule ^.+(/admin/css/.+)$ $1 [L]
RewriteRule ^.+(/admin/jscripts/.+)$ $1 [L]

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d


Poza tym używam w sekcji <head></head> wpisu <base href="" />
Edytor uruchamiam przy użyciu poniższego kodu:

Kod
    tinyMCE.init({
        mode : "textareas",
        theme : "advanced",
        editor_selector : "mceEditor",
        editor_deselector : "mceNoEditor",
        plugins : "safari,spellchecker,style,layer,table,save,advhr,advimage,advlink,iespell,in
inepopups,insertdatetime,preview,media,searchreplace,print,contextmenu,paste,dir
ctionality,fullscreen,noneditable,visualchars,nonbreaking,xhtmlxtras,pagebreak",
        theme_advanced_buttons1_add_before : "",
        theme_advanced_buttons1_add : "fontselect,fontsizeselect",
        theme_advanced_buttons2_add : "separator,insertdate,inserttime,preview,separator,forecolor,backcolor",
        theme_advanced_buttons2_add_before: "cut,copy,paste,pastetext,pasteword,separator,search,replace,separator",
        theme_advanced_buttons3_add_before : "tablecontrols,separator",
        theme_advanced_buttons3_add : "iespell,media,advhr,separator,print,separator,ltr,rtl,separator,fullscreen",
        theme_advanced_buttons4 : "insertlayer,moveforward,movebackward,absolute,|,styleprops,|,spellchecker,ci
e,abbr,acronym,del,ins,attribs,|,visualchars,nonbreaking,blockquote,pagebreak",
        theme_advanced_toolbar_location : "top",
        theme_advanced_toolbar_align : "left",
        theme_advanced_statusbar_location : "bottom",
        content_css : "css/content.css",
        plugin_insertdate_dateFormat : "%d-%m-%Y",
        plugin_insertdate_timeFormat : "%H:%M:%S",
        theme_advanced_resize_horizontal : false,
        theme_advanced_resizing : false,
        apply_source_formatting : true,
        fix_table_elements : true,
        fix_list_elements : true,
        fix_nesting : true,
        inline_styles : true,
        cleanup : true,
        cleanup_on_startup : true,
        verify_html : true,
        convert_fonts_to_spans : true,
        relative_urls : false,
        remove_script_host : false,
        language : "pl",
        spellchecker_languages : "+English=en,Polish=pl"
    });



Jak temu zaradzić?
Proszę o pomoc.
seth-kk
wyglada tak jakby nie mogl dostac sie do plikow z tlumaczeniami i pluginami - proponuje najpierw sprawdzac czy plik istnieje a pozniej stosowac RewriteRule
erix
Najpierw RewriteCond, potem RewriteRule, a nie na odwrót. [;
Savage.Mephisto
Cytat(erix @ 29.05.2009, 12:20:12 ) *
Najpierw RewriteCond, potem RewriteRule, a nie na odwrót. [;


Pliki z tłumaczeniami znajdują się w odpowiednim miejscu na serwerze.
Powyższy zabieg nic nie wnosi do rozwiązania problemu. Czy macie inne pomysły na rozwiązanie mojego problemu?
erix
Pokaż, co zmieniłeś, bo mam poważne wątpliwości.

Daj cały htaccess.
Savage.Mephisto
Cytat(erix @ 29.05.2009, 14:31:58 ) *
Pokaż, co zmieniłeś, bo mam poważne wątpliwości.

Daj cały htaccess.


Zgodnie z życzeniem cała zawartość pliku .htaccess:

Kod
RewriteEngine On
DirectoryIndex index.html index.php
Options FollowSymLinks
Options -Indexes

RewriteCond %{HTTP_HOST} ^henmar.com.pl/sklep [NC,OR]
RewriteCond %{HTTP_HOST} ^www.henmar.com.pl/sklep [NC,OR]
RewriteCond %{HTTP_HOST} ^sklep.henmar.com.pl [NC,OR]
RewriteCond %{HTTP_HOST} ^www.sklep.henmar.com.pl [NC]
RewriteRule (.*) http://www.henmar.com.pl/sklep/$1 [R=301,L]

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d

RewriteRule ^.+(/images/.+)$ $1 [L]
RewriteRule ^.+(/galeria/.+)$ $1 [L]
RewriteRule ^.+(/kolory/.+)$ $1 [L]
RewriteRule ^.+(/swf/.+)$ $1 [L]
RewriteRule ^.+(/css/.+)$ $1 [L]
RewriteRule ^.+(/js/.+)$ $1 [L]

RewriteRule ^.+(/images/admin/.+)$ $1 [L]
RewriteRule ^.+(/admin/css/.+)$ $1 [L]
RewriteRule ^.+(/admin/jscripts/.+)$ $1 [L]

# Strony bledow
ErrorDocument 404 http://www.henmar.com.pl/sklep

# Index
RewriteRule ^index.html$ index.php [L]

# Referencje
RewriteRule ^referencje.html$ referencje.php [L]

# Newsletter
RewriteRule ^newsletter.html$ newsletter.php [L]
RewriteRule ^newsletter_unreg.html$ newsletter_unreg.php [L]

# Kontakt
RewriteRule ^kontakt.html$ kontakt.php [L]

# Moje konto
RewriteRule ^moje-konto.html$ konto.php [L]
RewriteRule ^usun-konto.html$ konto.php?go=delaccount [L]
RewriteRule ^zmiana-danych-teleadresowych.html$ konto.php?go=userverifypass [L]
RewriteRule ^zmiana-hasla.html$ konto.php?go=usereditpass [L]
RewriteRule ^zmiana-adresu-email.html$ konto.php?go=usereditemail [L]
RewriteRule ^historia-zamowien.html$ konto.php?go=showhistory [L]

RewriteRule ^formularz-aktywacji-konta.html$ activeregform.php [L]
RewriteRule ^aktywacja-konta.html$ activereg.php [L]
RewriteRule ^formularz-odzyskiwania-hasla.html$ lostpassform.php [L]
RewriteRule ^odzyskiwanie-hasla.html$ lostpass.php [L]
RewriteRule ^zapomniane-haslo.html$ pass.php [L]

# Logowanie
RewriteRule ^panel-logowania.html$ login.php [L]
RewriteRule ^wyloguj.html$ logout.php [L]

# Rejestracja
RewriteRule ^rejestracja-konta.html$ register.php [L]

# Nowosci
RewriteRule ^nowosci.html$ nowosci.php [L]
RewriteRule ^nowosci.html&start=([0-9]+)$ nowosci.php?start=$1 [L]

# Promocje
RewriteRule ^promocje.html$ promocje.php [L]
RewriteRule ^promocje.html&start=([0-9]+)$ promocje.php?start=$1 [L]

# Koszyk
RewriteRule ^moj-koszyk.html$ koszyk.php [L]
RewriteRule ^oproznij-koszyk.html$ koszyk.php?go=delall [L]

# Zamowienie
RewriteRule ^kasa.html$ zamowienie.php [L]
RewriteRule ^zloz-zamowienie.html$ zamowienie_final.php [L]
RewriteRule ^numer-zamowienia.html$ nr_zam.php [L]

# Podstrony
RewriteRule ^([a-z0-9\-\_]+).html$ index.php?fly=$1 [L]

# Recenzje
RewriteRule ^dodaj-recenzje+/[a-z0-9\-\_]+,([0-9]+).html$ recenzja.php?id=$1 [L]

# Pokaz produkt
RewriteRule ^[a-z0-9\-\_]+,([0-9]+).html$ produkt.php?prodId=$1 [L]
RewriteRule ^[a-z0-9\-\_]+,([0-9]+).html&start=([0-9]+)$ produkt.php?prodId=$1&start=$2 [L]

# Polec produkt
RewriteRule ^polec-produkt+/([0-9]+).html$ message.php?prodId=$1 [L]
RewriteRule ^polec-produkt.html$ message.php [L]

# Pokaz kategorie, podkategorie
RewriteRule ^[a-z0-9\-\_]+/([0-9]+).html$ goto.php?d=$1 [L]
RewriteRule ^[a-z0-9\-\_]+/([0-9]+).html&start=([0-9]+)$ goto.php?d=$1&start=$2 [L]

RewriteRule ^[a-z0-9\-\_]+/[a-z0-9\-\_]+/([0-9]+),([0-9]+).html$ goto.php?d=$1&podkat=$2 [L]
RewriteRule ^[a-z0-9\-\_]+/[a-z0-9\-\_]+/([0-9]+),([0-9]+).html&start=([0-9]+)$ goto.php?d=$1&podkat=$2&start=$3 [L]

RewriteRule ^[a-z0-9\-\_]+/[a-z0-9\-\_]+/[a-z0-9\-\_]+/([0-9]+),([0-9]+),([0-9]+).html$ goto.php?d=$1&podkat=$2&podkat2=$3 [L]
RewriteRule ^[a-z0-9\-\_]+/[a-z0-9\-\_]+/[a-z0-9\-\_]+/([0-9]+),([0-9]+),([0-9]+).html&start=([0-9]+)$ goto.php?d=$1&podkat=$2&podkat2=$3&start=$4 [L]

# Zabezpieczenie przed botami
RewriteCond %{HTTP_USER_AGENT} ^BlackWidow [OR]
RewriteCond %{HTTP_USER_AGENT} ^Bot\ mailto:craftbot@yahoo.com [OR]
RewriteCond %{HTTP_USER_AGENT} ^ChinaClaw [OR]
RewriteCond %{HTTP_USER_AGENT} ^Custo [OR]
RewriteCond %{HTTP_USER_AGENT} ^DISCo [OR]
RewriteCond %{HTTP_USER_AGENT} ^Download\ Demon [OR]
RewriteCond %{HTTP_USER_AGENT} ^eCatch [OR]
RewriteCond %{HTTP_USER_AGENT} ^EirGrabber [OR]
RewriteCond %{HTTP_USER_AGENT} ^EmailSiphon [OR]
RewriteCond %{HTTP_USER_AGENT} ^EmailWolf [OR]
RewriteCond %{HTTP_USER_AGENT} ^Express\ WebPictures [OR]
RewriteCond %{HTTP_USER_AGENT} ^ExtractorPro [OR]
RewriteCond %{HTTP_USER_AGENT} ^EyeNetIE [OR]
RewriteCond %{HTTP_USER_AGENT} ^FlashGet [OR]
RewriteCond %{HTTP_USER_AGENT} ^GetRight [OR]
RewriteCond %{HTTP_USER_AGENT} ^GetWeb! [OR]
RewriteCond %{HTTP_USER_AGENT} ^Go!Zilla [OR]
RewriteCond %{HTTP_USER_AGENT} ^Go-Ahead-Got-It [OR]
RewriteCond %{HTTP_USER_AGENT} ^GrabNet [OR]
RewriteCond %{HTTP_USER_AGENT} ^Grafula [OR]
RewriteCond %{HTTP_USER_AGENT} ^HMView [OR]
RewriteCond %{HTTP_USER_AGENT} HTTrack [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^Image\ Stripper [OR]
RewriteCond %{HTTP_USER_AGENT} ^Image\ Sucker [OR]
RewriteCond %{HTTP_USER_AGENT} Indy\ Library [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^InterGET [OR]
RewriteCond %{HTTP_USER_AGENT} ^Internet\ Ninja [OR]
RewriteCond %{HTTP_USER_AGENT} ^JetCar [OR]
RewriteCond %{HTTP_USER_AGENT} ^JOC\ Web\ Spider [OR]
RewriteCond %{HTTP_USER_AGENT} ^larbin [OR]
RewriteCond %{HTTP_USER_AGENT} ^LeechFTP [OR]
RewriteCond %{HTTP_USER_AGENT} ^Mass\ Downloader [OR]
RewriteCond %{HTTP_USER_AGENT} ^MIDown\ tool [OR]
RewriteCond %{HTTP_USER_AGENT} ^Mister\ PiX [OR]
RewriteCond %{HTTP_USER_AGENT} ^Navroad [OR]
RewriteCond %{HTTP_USER_AGENT} ^NearSite [OR]
RewriteCond %{HTTP_USER_AGENT} ^NetAnts [OR]
RewriteCond %{HTTP_USER_AGENT} ^NetSpider [OR]
RewriteCond %{HTTP_USER_AGENT} ^Net\ Vampire [OR]
RewriteCond %{HTTP_USER_AGENT} ^NetZIP [OR]
RewriteCond %{HTTP_USER_AGENT} ^Octopus [OR]
RewriteCond %{HTTP_USER_AGENT} ^Offline\ Explorer [OR]
RewriteCond %{HTTP_USER_AGENT} ^Offline\ Navigator [OR]
RewriteCond %{HTTP_USER_AGENT} ^PageGrabber [OR]
RewriteCond %{HTTP_USER_AGENT} ^Papa\ Foto [OR]
RewriteCond %{HTTP_USER_AGENT} ^pavuk [OR]
RewriteCond %{HTTP_USER_AGENT} ^pcBrowser [OR]
RewriteCond %{HTTP_USER_AGENT} ^RealDownload [OR]
RewriteCond %{HTTP_USER_AGENT} ^ReGet [OR]
RewriteCond %{HTTP_USER_AGENT} ^SiteSnagger [OR]
RewriteCond %{HTTP_USER_AGENT} ^SmartDownload [OR]
RewriteCond %{HTTP_USER_AGENT} ^SuperBot [OR]
RewriteCond %{HTTP_USER_AGENT} ^SuperHTTP [OR]
RewriteCond %{HTTP_USER_AGENT} ^Surfbot [OR]
RewriteCond %{HTTP_USER_AGENT} ^tAkeOut [OR]
RewriteCond %{HTTP_USER_AGENT} ^Teleport\ Pro [OR]
RewriteCond %{HTTP_USER_AGENT} ^VoidEYE [OR]
RewriteCond %{HTTP_USER_AGENT} ^Web\ Image\ Collector [OR]
RewriteCond %{HTTP_USER_AGENT} ^Web\ Sucker [OR]
RewriteCond %{HTTP_USER_AGENT} ^WebAuto [OR]
RewriteCond %{HTTP_USER_AGENT} ^WebCopier [OR]
RewriteCond %{HTTP_USER_AGENT} ^WebFetch [OR]
RewriteCond %{HTTP_USER_AGENT} ^WebGo\ IS [OR]
RewriteCond %{HTTP_USER_AGENT} ^WebLeacher [OR]
RewriteCond %{HTTP_USER_AGENT} ^WebReaper [OR]
RewriteCond %{HTTP_USER_AGENT} ^WebSauger [OR]
RewriteCond %{HTTP_USER_AGENT} ^Website\ eXtractor [OR]
RewriteCond %{HTTP_USER_AGENT} ^Website\ Quester [OR]
RewriteCond %{HTTP_USER_AGENT} ^WebStripper [OR]
RewriteCond %{HTTP_USER_AGENT} ^WebWhacker [OR]
RewriteCond %{HTTP_USER_AGENT} ^WebZIP [OR]
RewriteCond %{HTTP_USER_AGENT} ^Wget [OR]
RewriteCond %{HTTP_USER_AGENT} ^Widow [OR]
RewriteCond %{HTTP_USER_AGENT} ^WWWOFFLE [OR]
RewriteCond %{HTTP_USER_AGENT} ^Xaldon\ WebSpider [OR]
RewriteCond %{HTTP_USER_AGENT} ^Zeus
RewriteRule ^.* - [F,L]

# Flagi
SetEnv PHP_VER 5
php_flag allow_url_fopen off
php_flag register_globals off
erix
RewriteCond działa tylko dla najbliższego RewriteRule, dla następnych już nie.

Pozostaje albo powielenie wszystkich RewriteCond dla każdego przepisania (masochizm tongue.gif), albo
Kod
RewriteCond %{REQUEST_FILENAME} -f
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule (*.) - [L]


gdzieś na początku.
Savage.Mephisto
No niestety, parser sugeruje na błędną konfigurację w pliku .htaccess i wypluwa błąd 500.
erix
Bo to się po RewriteEngine On wstawia... :X

Trochę samodzielności, człowieku...
Savage.Mephisto
Dzięki erix za pomoc.
To jest wersja lo-fi głównej zawartości. Aby zobaczyć pełną wersję z większą zawartością, obrazkami i formatowaniem proszę kliknij tutaj.
Invision Power Board © 2001-2025 Invision Power Services, Inc.