Apache Server configuration support - rewriting

This is Interesting: Free IT Magazines  
Home > Archive > Apache Server configuration support > January 2005 > rewriting





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author rewriting
christian zimmermann

2005-01-17, 6:00 pm

Hi folks I need a bit help

I user several rewrite rules on my server and they all work pretty fine.
now I need a new one that says everything with
http://my.domain.com/dir/some_stuff
will be rewritten to
http://my.domain.com/some_stuff

only dir should be removed from the url is that possible?

TIA
Christian
Alvaro G Vicario

2005-01-17, 6:00 pm

*** christian zimmermann wrote/escribió (Mon, 17 Jan 2005 18:13:25 +0100):
> http://my.domain.com/dir/some_stuff
> will be rewritten to
> http://my.domain.com/some_stuff


Untested code, I hope it gives you a clue:

RewriteEngine on
RewriteBase /

RewriteRule /[^/]+/(.*) /$1



--
-- Álvaro G. Vicario - Burgos, Spain
-- Thank you for not e-mailing me your questions
--
christian zimmermann

2005-01-17, 6:00 pm

Alvaro G Vicario wrote:
> Untested code, I hope it gives you a clue:
>
> RewriteEngine on
> RewriteBase /
>
> RewriteRule /[^/]+/(.*) /$1
>
>
>


works fine I just removed RewriteBase

Thanks a lot
christian zimmermann

2005-01-17, 6:00 pm

christian zimmermann wrote:
> Alvaro G Vicario wrote:
>
>
> works fine I just removed RewriteBase
>
> Thanks a lot


Sorry I were too fast, now all urls with my.domain.com/bla/anything
are rewritten but only urls with /blub/anything should be rewritten
do you have another hint?

TIA
Chris
Alvaro G Vicario

2005-01-18, 7:51 am

*** christian zimmermann wrote/escribió (Mon, 17 Jan 2005 19:23:10 +0100):
> Sorry I were too fast, now all urls with my.domain.com/bla/anything
> are rewritten but only urls with /blub/anything should be rewritten
> do you have another hint?


I thought bla was a variable...

RewriteRule /blub/(.*) /$1

--
-- Álvaro G. Vicario - Burgos, Spain
-- Thank you for not e-mailing me your questions
--
Alvaro G Vicario

2005-01-19, 5:54 pm

*** christian zimmermann wrote/escribió (Mon, 17 Jan 2005 18:13:25 +0100):
> http://my.domain.com/dir/some_stuff
> will be rewritten to
> http://my.domain.com/some_stuff


Untested code, I hope it gives you a clue:

RewriteEngine on
RewriteBase /

RewriteRule /[^/]+/(.*) /$1



--
-- Álvaro G. Vicario - Burgos, Spain
-- Thank you for not e-mailing me your questions
--
Alvaro G Vicario

2005-01-20, 8:49 pm

*** christian zimmermann wrote/escribió (Mon, 17 Jan 2005 18:13:25 +0100):
> http://my.domain.com/dir/some_stuff
> will be rewritten to
> http://my.domain.com/some_stuff


Untested code, I hope it gives you a clue:

RewriteEngine on
RewriteBase /

RewriteRule /[^/]+/(.*) /$1



--
-- Álvaro G. Vicario - Burgos, Spain
-- Thank you for not e-mailing me your questions
--
christian zimmermann

2005-01-20, 8:49 pm

Alvaro G Vicario wrote:
> Untested code, I hope it gives you a clue:
>
> RewriteEngine on
> RewriteBase /
>
> RewriteRule /[^/]+/(.*) /$1
>
>
>


works fine I just removed RewriteBase

Thanks a lot
Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com