eGospodarka.pl
eGospodarka.pl poleca

eGospodarka.plGrupypl.comp.wwwapache2, mod_rewrite i wyrażenia regularne.apache2, mod_rewrite i wyrażenia regularne.
  • Path: news-archive.icm.edu.pl!agh.edu.pl!news.agh.edu.pl!newsfeed2.atman.pl!newsfeed.
    atman.pl!newsfeed.neostrada.pl!unt-exc-02.news.neostrada.pl!unt-spo-a-02.news.n
    eostrada.pl!news.neostrada.pl.POSTED!not-for-mail
    From: Bartosz <s...@o...pl>
    Newsgroups: pl.comp.www
    Subject: apache2, mod_rewrite i wyrażenia regularne.
    Date: Wed, 23 Jan 2013 08:26:29 +0100
    Message-ID: <2...@4...com>
    X-Newsreader: Forte Agent 1.8/32.548
    MIME-Version: 1.0
    Content-Type: text/plain; charset=ISO-8859-2
    Content-Transfer-Encoding: quoted-printable
    Lines: 59
    Organization: Telekomunikacja Polska
    NNTP-Posting-Host: 83.3.10.218
    X-Trace: 1358925986 unt-rea-b-01.news.neostrada.pl 1226 83.3.10.218:58159
    X-Complaints-To: a...@n...neostrada.pl
    Xref: news-archive.icm.edu.pl pl.comp.www:401804
    [ ukryj nagłówki ]

    Chciałbym mieć taki efekt aby cokolwiek się nie wpisze w przeglądarkę
    to przekierowuje na stronę główną,
    chyba że są to wywołania plików jpg to wtedy mod_rewrite pozostawia nas tam gdzie
    był.

    Różne nieudane próby
    <VirtualHost *:80>
    DocumentRoot /virtual/www/grafiki
    ServerName grafiki.strona.pl
    ServerAlias www.grafiki.strona.pl
    ServerSignature Off
    LogLevel debug
    Alias /grafiki /virtual/www/grafiki
    <Directory /*/>
    RewriteEngine on
    RewriteRule .[^jpg] http://www.strona.pl/
    #RewriteCond %{HTTP_HOST} .!^jpg
    #RewriteRule (.*)$ http://%{HTTP_HOST}/$1 [R=301,L]
    #RewriteRule (.*)$ http://%{HTTP_HOST}/ [R=301,L]
    #RewriteRule .[^jpg] http://www.strona.pl/
    #RewriteCond %{HTTP_HOST} ^strona\.pl$
    #RewriteRule .*^jpg .*^jpg
    #RewriteRule .*[^jpg] http://www.strona.pl/
    #RewriteRule ^ http://www.strona.pl/
    </Directory>
    </VirtualHost>

    .htaccess
    # AddDefaultCharset UTF-8
    AddType text/x-component .htc

    <IfModule mod_php4.c>
    php_flag display_errors Off
    php_flag log_errors On
    php_value error_log logs/errors
    php_value upload_max_filesize 5M
    php_value post_max_size 6M
    </IfModule>

    <IfModule mod_php5.c>
    php_flag display_errors Off
    php_flag log_errors On
    php_value error_log logs/errors
    php_value upload_max_filesize 5M
    php_value post_max_size 6M
    php_value register_globals On
    </IfModule>

    <FilesMatch "(\.inc|\~)$">
    Order allow,deny
    Deny from all
    </FilesMatch>

    Order deny,allow
    Allow from all
    -
    Pozdrawiam
    Bartosz

Podziel się

Poleć ten post znajomemu poleć

Wydrukuj ten post drukuj


Następne wpisy z tego wątku

Najnowsze wątki z tej grupy


Najnowsze wątki

Szukaj w grupach

Eksperci egospodarka.pl

1 1 1

Wpisz nazwę miasta, dla którego chcesz znaleźć jednostkę ZUS.

Wzory dokumentów

Bezpłatne wzory dokumentów i formularzy.
Wyszukaj i pobierz za darmo: