Vasko Tomanov wrote:
>
> iskam da napravia slednoto neshto ..
>
> da redirektna vsithko koeto odva kam 10.0.0.10 na sashtoto ime na
> domaina + /servlets/redirect
>
> naprimer ako se izvika - http://www.niakoi.com/ ( za koito w dns-a pushe
> tshe sotshi 10.0.0.10) da se prenasotshi kam
> http://www.niakoi.com/servlets/redirect
>
> zashtoto da raoti i za:
>
> www.niakoi.com -> http://www.niakoi.com/servlets/redirect
> www.niakoi.com/xx.yy/xx -> http://www.niakoi.com/servlets/redirect
>
> primerqat w apache dokumentaciata izglejda po slednia nasthin :
>
> RedirectMatch (.*)\.gif$ http://www.anotherserver.com$1.jpg
>
> na praktika tova prenasotshva vsitshki fajlowe ot tipa *.gif kam
> http://www.anotherserver.com/*.jpg
>
> problemat mi se satoi w tova tshe ne moga s RegExp da vzema imeto na
> domaina - ami mi dava samso tova deto e sled imeto na domaina - i to s
> edna tshartitshka...
>
> NIAKVI IDEI ?
RewriteEngine on
RewriteCond %{HTTP_HOST} !^www\.niakoi\.com [NC]
RewriteCond %{HTTP_HOST} !^$
RewriteRule ^/(.*) http://www.koitosiiskash.com/$1 [L,R]
http://www.engelschall.com/pw/apache/rewriteguide/
Triabva da imash mod_rewrite compliran...
===========================================================================
A mail-list of Linux Users Group - Bulgaria (bulgarian linuxers)
http://www.linux-bulgaria.org/ Hosted by Internet Group Ltd. - Stara Zagora