httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "gregory duchesnes" <greg...@icilalune.com>
Subject [users@httpd] url rewriting problem
Date Fri, 24 Sep 2004 11:22:09 GMT
Hi all,

I have a knock your head on walls problem :

I have several domain names on which i have the same rewriting policies.
domains names are organized in such manner :

/var/www/domain1/web/
/var/www/domain2/web/
/var/www/domain3/web/
...

I do url rewriting on the "test" folder (for example), in which there's a
folder corresponding to the language.
both folders ("test/en" for example) exist on the server.
Therefore, i have a Directory directive for each domain :

<Directory /var/www/ndd1/web/test/>
    RewriteEngine on
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteRule ^(.+)/page_(.+)\.html$ /script.php?langue=$1&rubs=$2 [L]
</Directory>

...

which works smoothly, but i'd like not to do it everytime i create a new
domain, i then tried this :

<Directory /var/www/*/web/test/>
    RewriteEngine on
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteRule ^(.+)/page_(.+)\.html$ /script.php?langue=$1&rubs=$2 [L]
</Directory>

and this

<DirectoryMatch /var/www/*/web/test/>
    RewriteEngine on
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteRule ^(.+)/page_(.+)\.html$ /script.php?langue=$1&rubs=$2 [L]
</DirectoryMatch>


and this

<DirectoryMatch "^/var/www/*/web/test/" >
    RewriteEngine on
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteRule ^(.+)/page_(.+)\.html$ /script.php?langue=$1&rubs=$2 [L]
</DirectoryMatch>



all tries fail with a 404 error (seems like there's no match)


I checked the error.log but could not find any useful info.


What's wrong?


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message