views:

11

answers:

1

Here's what I have:

<VirtualHost 127.0.0.1>
   DocumentRoot D:\XAMPP\xampp\htdocs\mysites\tupega.com
   ServerName tupega.tld

    <IfModule mod_rewrite.c>  
    RewriteEngine on  
    RewriteRule ^/nuevoanuncio$ /create/nuevoanuncio.php    
    </IfModule>

    <IfModule mod_rewrite.c>  
    RewriteEngine on    
    RewriteRule ^/registrar$ /create/nuevousuario.php
    </IfModule> 
</VirtualHost>

Do I have to create a new <IfModule> for every rewrite I need?

+1  A: 

No, you can put all your rules in one <IfModule> block:

<IfModule mod_rewrite.c>
    RewriteEngine on
    RewriteRule ^/nuevoanuncio$ /create/nuevoanuncio.php
    RewriteRule ^/registrar$ /create/nuevousuario.php
</IfModule>

The <IfModule> block is only used to avoid errors when mod_rewrite is not available.

Gumbo