Visualizzazione risultati 1 fino 8 di 8

Discussione: Problema con .htaccess

  1. #1
    Guest

    Predefinito Problema con .htaccess

    Ragazzi ho problemi nella visualizzazione del sito e del pannello di controllo che risulta tutto sballato!
    Ecco il file .htaccess nella root del sito:
    Codice:
    #####################################################
    #  READ THIS COMPLETELY IF YOU CHOOSE TO USE THIS FILE
    #
    # The line just below this section: 'Options +FollowSymLinks' may cause problems
    # with some server configurations.  It is required for use of mod_rewrite, but may already
    # be set by your server administrator in a way that dissallows changing it in
    # your .htaccess file.  If using it causes your server to error out, comment it out (add # to
    # beginning of line), reload your site in your browser and test your sef url's.  If they work,
    # it has been set by your server administrator and you do not need it set here.
    #
    #####################################################
    Options +FollowSymLinks
    
    RewriteEngine on
    RewriteBase /
    RewriteRule ^c,(.*),Keyword.htm$ index.php [R=301,L]
    RewriteCond %{REQUEST_URI} (/|\.htm|\.html|/[^.]*)$  [NC]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    #RewriteRule ^rss([0-9]{0,}),(.*).html$ rss.php?cat=$1 [L]
    RewriteRule (.*) index.php?page=$1&%{QUERY_STRING}
    RewriteRule templates\/(.*).tpl$ index.php[F]
    RewriteRule templates_c\/(.*) index.php[F]
    RewriteRule configs\/(.*).conf$ index.php [F]
    
    #RewriteRule ^(.*)http(.*)$ index.php [R=301]
    #RewriteRule ^p-(.*).html$ index.php?page=$1 [L]
    
    ## av:php5-engine
    AddHandler av-php5 .php
    Questo .htaccess invece ed della directory admin:
    Codice:
    #####################################################
    #  READ THIS COMPLETELY IF YOU CHOOSE TO USE THIS FILE
    #
    # The line just below this section: 'Options +FollowSymLinks' may cause problems
    # with some server configurations.  It is required for use of mod_rewrite, but may already
    # be set by your server administrator in a way that dissallows changing it in
    # your .htaccess file.  If using it causes your server to error out, comment it out (add # to
    # beginning of line), reload your site in your browser and test your sef url's.  If they work,
    # it has been set by your server administrator and you do not need it set here.
    #
    #####################################################
    Options +FollowSymLinks
    
    RewriteEngine on
    RewriteBase /admin
    
    RewriteCond %{REQUEST_URI} (/|\.htm|\.html|/[^.]*)$  [NC]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    #RewriteRule ^rss([0-9]{0,}),(.*).html$ rss.php?cat=$1 [L]
    RewriteRule (.*) index.php?page=$1
    RewriteRule templates\/(.*).tpl$ index.php[F]
    RewriteRule templates_c\/(.*) index.php[F]
    RewriteRule configs\/(.*).conf$ index.php [F]
    #RewriteRule ^p-(.*).html$ index.php?page=$1 [L]
    
    # # av:php5-engine
    AddHandler av-php5 .php
    Ultima modifica di soigne : 13-11-2009 alle ore 23.47.56

  2. #2
    L'avatar di andreafallico
    andreafallico non è connesso Super Moderatore
    Data registrazione
    02-06-2009
    Messaggi
    1,981

    Predefinito

    Ti da' qualche errore?
    Cosa significa "risulta tutto sballato"?

  3. #3
    L'avatar di miki92
    miki92 non è connesso AlterGuru 2500
    Data registrazione
    21-04-2007
    Residenza
    Procida (NA)
    Messaggi
    4,226

    Predefinito

    Prova così:

    Codice PHP:
    #####################################################
    # READ THIS COMPLETELY IF YOU CHOOSE TO USE THIS FILE
    #
    # The line just below this section: 'Options +FollowSymLinks' may cause problems
    # with some server configurations. It is required for use of mod_rewrite, but may already
    # be set by your server administrator in a way that dissallows changing it in
    # your .htaccess file. If using it causes your server to error out, comment it out (add # to
    # beginning of line), reload your site in your browser and test your sef url's. If they work,
    # it has been set by your server administrator and you do not need it set here.
    #
    #####################################################
    #Options +FollowSymLinks

    RewriteEngine on
    RewriteBase
    /
    RewriteRule ^c,(.*),Keyword.htm$ index.php [R=301,L]
    RewriteCond %{REQUEST_URI} (/|\.htm|\.html|/[^.]*)$ [NC]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond
    %{REQUEST_FILENAME} !-d
    #RewriteRule ^rss([0-9]{0,}),(.*).html$ rss.php?cat=$1 [L]
    RewriteRule (.*) index.php?page=$1&%{QUERY_STRING}
    RewriteRule templates\/(.*).tpl$ index.php [F]
    RewriteRule templates_c\/(.*) index.php [F]
    RewriteRule configs\/(.*).conf$ index.php [F]

    #RewriteRule ^(.*)http(.*)$ index.php [R=301]
    #RewriteRule ^p-(.*).html$ index.php?page=$1 [L]

    ## av:php5-engine
    AddHandler av-php5 .php
    Codice PHP:
    #####################################################
    # READ THIS COMPLETELY IF YOU CHOOSE TO USE THIS FILE
    #
    # The line just below this section: 'Options +FollowSymLinks' may cause problems
    # with some server configurations. It is required for use of mod_rewrite, but may already
    # be set by your server administrator in a way that dissallows changing it in
    # your .htaccess file. If using it causes your server to error out, comment it out (add # to
    # beginning of line), reload your site in your browser and test your sef url's. If they work,
    # it has been set by your server administrator and you do not need it set here.
    #
    #####################################################
    #Options +FollowSymLinks

    RewriteEngine on
    RewriteBase
    /admin

    RewriteCond
    %{REQUEST_URI} (/|\.htm|\.html|/[^.]*)$ [NC]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond
    %{REQUEST_FILENAME} !-d
    #RewriteRule ^rss([0-9]{0,}),(.*).html$ rss.php?cat=$1 [L]
    RewriteRule (.*) index.php?page=$1
    RewriteRule templates
    \/(.*).tpl$ index.php[F]
    RewriteRule templates_c\/(.*) index.php[F]
    RewriteRule configs\/(.*).conf$ index.php [F]
    #RewriteRule ^p-(.*).html$ index.php?page=$1 [L]
    Apprezzi l'aiuto? Offrimi un caffè!

  4. #4
    Guest

    Predefinito

    Grazie miki ho provato ma non va.

    Per andrea: praticamente la home sembra apposto in apparenza ma se provi a cambiare città scompare la paginazione, mentre nel pannello di amministrazione il menù risulta messo in diagonale senza paginazione e skin.

    p.s: Nella spiegazione si dice che bisgona mettere questo paremetro su on: "output_buffering", come si fa?
    Ultima modifica di soigne : 14-11-2009 alle ore 13.13.43

  5. #5
    L'avatar di miki92
    miki92 non è connesso AlterGuru 2500
    Data registrazione
    21-04-2007
    Residenza
    Procida (NA)
    Messaggi
    4,226

    Predefinito

    output_buffering è già impostato su on se hai attivo php5 e dal codice .htaccess che ci hai postato è attivo.
    Apprezzi l'aiuto? Offrimi un caffè!

  6. #6
    Guest

    Predefinito

    capito..ma il problema dove potrebbe essere?


    EDIT:
    potrebbe esser un problema di requisiti?
    Nel file leggimi dice:

    - Linux or Windows server with GD
    Library installed
    - PHP 5
    - MySQL 4.1 or above
    - Url rewriting allowed

    Ragazzi non so se puo essere utile ma ecco come appare il pannello di controllo:
    Ultima modifica di seneca : 14-11-2009 alle ore 16.43.16

  7. #7
    L'avatar di miki92
    miki92 non è connesso AlterGuru 2500
    Data registrazione
    21-04-2007
    Residenza
    Procida (NA)
    Messaggi
    4,226

    Predefinito

    Come prima cosa non scrivere messaggi consecutivi.

    Tornando al tuo problema...

    Dando uno sguardo al codice sorgente del sito si può ben notare che il problema sta nel rewrite, in pratica quando viene applicato i collegamenti ai fogli di stile CSS non funzionano.

    Dovresti agire a livello di codice HTML/PHP per risolvere questo errore.
    Apprezzi l'aiuto? Offrimi un caffè!

  8. #8
    Guest

    Predefinito

    sapresti dirmi quali file modificare?

Regole di scrittura

  • Non puoi creare nuove discussioni
  • Non puoi rispondere ai messaggi
  • Non puoi inserire allegati.
  • Non puoi modificare i tuoi messaggi
  •