Premetto che di configurazione di Linux, conosco poco o nulla e premetto anche che che sul sito on-line funziona tutto perfettamente, ma siccome dovrei fare una modifica alle regole del "rewrite", ho riportato tutto in locale (ambiente Ubuntu, Apache, Php, Mysql funzionante...)
Ho lanciato il seguente comando ed eseguito il restart.
Inoltre ho messocodice:sudo a2enmod rewrite sudo /etc/init.d/apache2 restart
in tutte le occorrenze del file /etc/apache2/sites-enabled/000-defaultcodice:AllowOverride All
codice:<VirtualHost *:80> ServerAdmin webmaster@localhost DocumentRoot /home/paolo/public_html/ <Directory /> Options FollowSymLinks AllowOverride All </Directory> <Directory /home/paolo/public_html/> Options Indexes FollowSymLinks MultiViews AllowOverride All Order allow,deny allow from all </Directory> ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/ <Directory "/usr/lib/cgi-bin"> AllowOverride All Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch Order allow,deny Allow from all </Directory> ErrorLog ${APACHE_LOG_DIR}/error.log # Possible values include: debug, info, notice, warn, error, crit, # alert, emerg. LogLevel warn CustomLog ${APACHE_LOG_DIR}/access.log combined Alias /doc/ "/usr/share/doc/" <Directory "/usr/share/doc/"> Options Indexes MultiViews FollowSymLinks AllowOverride All Order deny,allow Deny from all Allow from 127.0.0.0/255.0.0.0 ::1/128 </Directory> </VirtualHost>
Il file .htaccess è semplicemente questo
ma non funziona il rewrite.codice:AddType text/css .css Options -Indexes +FollowSymLinks RewriteEngine on RewriteRule ^([^/]*)\.shtml$ index.php?coditipo=$1 RewriteRule ^([^/]*)/([^/]*)\.shtml$ index.php?coditipo=$1&codisubbtipo=$2 RewriteRule ^([^/]*)/([^/]*)/([^/]*)\.shtml$ index.php?coditipo=$1&codisubbtipo=$2&codipost=$3 [L]
Se digito infatti http://localhost, chiaramente mi carica l'index.php, ma se clicco su uno dei link del tipo http://localhost/3/2/2.shtml mi ritorna l'errore
Qualche suggerimento?codice:The requested URL /3/2/2.shtml was not found on this server.
Grazie in anticipo

Rispondi quotando
