Visualizzazione dei risultati da 1 a 2 su 2
  1. #1

    Configurazione apache su windows rewrite index.php

    Buongiorno a tutti,
    ho installato su windows apache 2.4 con php e non riesco a far funzionare il rewrite modificando il file httpd di apache.
    Ho provato anche a creare il file .htaccess all'interno della cartella del sito ma modificando il file httpd di apache non mi calcola proprio il file .htaccess.
    lo stato dell'arte è il seguente:

    httpd di apache

    <Directory "D:\WEB\gima">
    Options All
    AllowOverride All
    Order deny,allow
    Allow from all
    RewriteEngine On
    RewriteBase /
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.*)$ index.php [QSA,L]
    </Directory>

    errore se accedo al sito:
    You don't have permission to access / on this server.

    se tolgo le righe del rewrite:
    RewriteEngine On
    RewriteBase /
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.*)$ index.php [QSA,L]

    accedo correttamente al sito

    c'è qualche anima buona che mi riesce a dare una mano?

    grazie mille
    Stefano

  2. #2
    ho controllato nel log di apache e visualizzo il seguente messaggio:
    [Thu Jul 05 14:22:04.118447 2018] [rewrite:error] [pid 6916:tid 1432] [client 127.0.0.1:55644] AH00670: Options FollowSymLinks and SymLinksIfOwnerMatch are both off, so the RewriteRule directive is also forbidden due to its similar ability to circumvent directory restrictions : D:/WEB/gima/index.php
    [Thu Jul 05 14:22:04.192249 2018] [rewrite:error] [pid 6916:tid 1432] [client 127.0.0.1:55644] AH00670: Options FollowSymLinks and SymLinksIfOwnerMatch are both off, so the RewriteRule directive is also forbidden due to its similar ability to circumvent directory restrictions : D:/WEB/gima/index.php, referer: http://gima.com/

    ho modificato l'httpd in

    <Directory "D:\WEB\gima">
    RewriteEngine On
    Options +ExecCGI +FollowSymLinks +SymLinksIfOwnerMatch
    AllowOverride All
    Order deny,allow
    Allow from all
    #RewriteBase /
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.*)$ index.php [QSA,L]
    </Directory>

    ma niente da fare

Permessi di invio

  • Non puoi inserire discussioni
  • Non puoi inserire repliche
  • Non puoi inserire allegati
  • Non puoi modificare i tuoi messaggi
  •  
Powered by vBulletin® Version 4.2.1
Copyright © 2024 vBulletin Solutions, Inc. All rights reserved.