httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From André Warnier>
Subject Re: [users@httpd] hide a URL
Date Mon, 15 Sep 2008 21:07:59 GMT
Rodrigo Correa de Paiva wrote:
> I need to hide part of a url.
> for example:
> || i need to hide the word "site"
> v
> which the most appropriate way to do this?
> mod_rewrite?
> I do not know mod_rewrite, could someone give me a help about what to do?
> Thanx
I'm a beginner with nod_rewrite too, but this seems a simple one, so let 
me try :

1) RewriteEngine on
2) RewriteLog /path-to-logfile
3) RewriteLogLevel 3
4) RewriteRule ^/site/(.*)$ /$1 [PT,L]

(Lines 2 and 3 so that you can follow what happens, in the named 
logfile.  When it works, set RewriteLogLevel back to 0).

I did not include the "" part, because that is not part 
of the URL.
The "PT" flag is so that, if you later decide to alias /community to 
something else, it will still do it.
The "L" flag is there to say that once that replacement is done, you 
don't want any other RewriteRule to do something else to the result.


The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:> for more info.
To unsubscribe, e-mail:
   "   from the digest:
For additional commands, e-mail:

View raw message