| ||||
| Re: mod_rewrite También hay que cambiar un Allowoverride none por Allowoverride all
__________________ www.mundodivx.com || www.mundodivx.org Pon tu mano en un horno caliente durante un minuto y te parecerá una hora. Siéntate junto a una chica preciosa durante una hora y te parecerá un minuto. Eso es la relatividad. |
| ||||
| Respuesta: mod_rewrite El Allowoverride no se necesita cambiar, eso es solo para poder saltarte la configuracion de apache y configurar todo desde un .htaccess pero tienes que poner: Options MultiViews Y tambien encender el motor de rewrite RewriteEngine on Te quedaria algo asi:
Código:
Ese es el sitio virtual por default de debian solo el agregue rewrite para este ejemplo NameVirtualHost *
<VirtualHost *>
ServerAdmin webmaster@localhost
RewriteEngine on
RewriteLog /var/log/rewrite.log
RewriteLogLevel 1
RewriteRule ^/ucpc/(.*)$ /ucpc.php?mode=$1 [PT]
DocumentRoot /var/www/
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory /var/www/>
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all
# This directive allows us to have apache2's default start page
# in /apache2-default/, but still have / go to the right place
RedirectMatch ^/$ /apache2-default/
</Directory>
ScriptAlias /cgi-bin/ /home/enrique/cgi-bin/
<Directory "/home/enrique/cgi-bin">
AllowOverride None
Options ExecCGI -MultiViews +SymLinksIfOwnerMatch
Order allow,deny
Allow from all
</Directory>
ErrorLog /var/log/apache2/error.log
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn
CustomLog /var/log/apache2/access.log combined
ServerSignature On
Alias /doc/ "/usr/share/doc/"
<Directory "/usr/share/doc/">
Options Indexes MultiViews FollowSymLinks
AllowOverride None
Order deny,allow
Deny from all
Allow from 127.0.0.0/255.0.0.0 ::1/128
</Directory>
</VirtualHost>
|
| ||||
| Respuesta: mod_rewrite Por cierto en lugar de usar Option Indexes te recomiendo Option -Indexes de otra manera en donde no tengas un index.html o .php lo que sea que este en el DirectoryIndex Apache te mostrara el Index of de tu folder. |