htaccess rewrite question

What would be the htaccess syntax to redirect requests as such?

Request
http://personalweb.example.com/~user
Rewrite to
http://personalweb.example.com/user/
Basically just removing the tilde.

Thanks
Nevets Steprock [ Mo, 12 November 2007 21:44 ] [ ID #1868489 ]

Re: htaccess rewrite question

"G" <. [at] .> wrote in message news:4738b9ee$0$14148$742ec2ed [at] news.sonic.net...
> What would be the htaccess syntax to redirect requests as such?
>
> Request
> http://personalweb.example.com/~user
> Rewrite to
> http://personalweb.example.com/user/
> Basically just removing the tilde.

If you do this globally, it can't be in an htaccess file - but must be in your
main configuration.
spam [ Di, 13 November 2007 00:07 ] [ ID #1868492 ]

Re: htaccess rewrite question

D. Stussy wrote:
> "G" <. [at] .> wrote in message
> news:4738b9ee$0$14148$742ec2ed [at] news.sonic.net...
>> What would be the htaccess syntax to redirect requests as such?
>>
>> Request
>> http://personalweb.example.com/~user
>> Rewrite to
>> http://personalweb.example.com/user/
>> Basically just removing the tilde.
>
> If you do this globally, it can't be in an htaccess file - but must
> be in your main configuration.

not serverwide, just on this domain.
samething? in the http.conf?
Nevets Steprock [ Di, 13 November 2007 01:10 ] [ ID #1869383 ]

Re: htaccess rewrite question

"G" <. [at] .> wrote in message news:4738eb0c$0$14064$742ec2ed [at] news.sonic.net...
> D. Stussy wrote:
> > "G" <. [at] .> wrote in message
> > news:4738b9ee$0$14148$742ec2ed [at] news.sonic.net...
> >> What would be the htaccess syntax to redirect requests as such?
> >>
> >> Request
> >> http://personalweb.example.com/~user
> >> Rewrite to
> >> http://personalweb.example.com/user/
> >> Basically just removing the tilde.
> >
> > If you do this globally, it can't be in an htaccess file - but must
> > be in your main configuration.
>
> not serverwide, just on this domain.
> samething? in the http.conf?

Yes - because it affects more than one user.
spam [ Di, 13 November 2007 03:12 ] [ ID #1869384 ]

Re: htaccess rewrite question

D. Stussy wrote:
> "G" <. [at] .> wrote in message
> news:4738eb0c$0$14064$742ec2ed [at] news.sonic.net...
>> D. Stussy wrote:
>>> "G" <. [at] .> wrote in message
>>> news:4738b9ee$0$14148$742ec2ed [at] news.sonic.net...
>>>> What would be the htaccess syntax to redirect requests as such?
>>>>
>>>> Request
>>>> http://personalweb.example.com/~user
>>>> Rewrite to
>>>> http://personalweb.example.com/user/
>>>> Basically just removing the tilde.
>>>
>>> If you do this globally, it can't be in an htaccess file - but must
>>> be in your main configuration.
>>
>> not serverwide, just on this domain.
>> samething? in the http.conf?
>
> Yes - because it affects more than one user.

Gotcha
Nevets Steprock [ Di, 13 November 2007 17:09 ] [ ID #1869394 ]

Re: htaccess rewrite question

On Nov 12, 8:44 pm, "G" <. [at] .> wrote:
> What would be the htaccess syntax to redirect requests as such?
>
> Requesthttp://personalweb.example.com/~user
> Rewrite tohttp://personalweb.example.com/user/
> Basically just removing the tilde.
>
> Thanks


this matches all requests that start with a /tilde combination and
catches everything else and redirects to just that
ReWriteRule ^/tilde(.*) /$1 [L]

i would have used the tilde character in the rule but im on a friends
mac book and cant find it on the keyboard. (or the delete key!)

in other words no url can start with a tilde or it will be served from
the url without. It doesnt update the url though
shimmyshack [ Mi, 14 November 2007 00:25 ] [ ID #1869398 ]
Webserver » alt.apache.configuration » htaccess rewrite question

Vorheriges Thema: Redirection purpose failing in-spite of using .htaccess file.
Nächstes Thema: Problems with apache and xampp