vorrei dare una regola di redirect ad apache2. ho provato 1000 guide e tutte dicono la stessa cosa ma non riesco cmq a fare ciò che voglio!
allora in /home/tommaso/workspace/site c'è questo file .htaccess
Codice: Seleziona tutto
# # av:php5-engine
RewriteEngine On
RewriteBase /
RewriteRule ^/blabla/([.]+)/?$ /blabla/index.phpCodice: Seleziona tutto
<VirtualHost *:80>
ServerAdmin webmaster@localhost
DocumentRoot /home/tommaso/workspace/site/
<Directory />
Options FollowSymLinks
AllowOverride All
</Directory>
<Directory /home/tommaso/workspace/site/>
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 None
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>Codice: Seleziona tutto
sudo a2enmod rewriteCodice: Seleziona tutto
apache2ctl -MCodice: Seleziona tutto
rewrite_module (shared)Codice: Seleziona tutto
sudo /etc/init.d/apache2 restartCodice: Seleziona tutto
curl http://localhost/blabla/uff
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>404 Not Found</title>
</head><body>
<h1>Not Found</h1>
<p>The requested URL /haircut/uff was not found on this server.</p>
<hr>
<address>Apache/2.2.20 (Ubuntu) Server at localhost Port 80</address>
</body></html>
potreste darmi una mano?!?!


