htaccess rewrite question
htaccess rewrite question
am 12.11.2007 21:44:16 von Nevets Steprock
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
Re: htaccess rewrite question
am 13.11.2007 00:07:04 von spam
"G" <.@.> wrote in message news:4738b9ee$0$14148$742ec2ed@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.
Re: htaccess rewrite question
am 13.11.2007 01:10:23 von Nevets Steprock
D. Stussy wrote:
> "G" <.@.> wrote in message
> news:4738b9ee$0$14148$742ec2ed@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?
Re: htaccess rewrite question
am 13.11.2007 03:12:36 von spam
"G" <.@.> wrote in message news:4738eb0c$0$14064$742ec2ed@news.sonic.net...
> D. Stussy wrote:
> > "G" <.@.> wrote in message
> > news:4738b9ee$0$14148$742ec2ed@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.
Re: htaccess rewrite question
am 13.11.2007 17:09:36 von Nevets Steprock
D. Stussy wrote:
> "G" <.@.> wrote in message
> news:4738eb0c$0$14064$742ec2ed@news.sonic.net...
>> D. Stussy wrote:
>>> "G" <.@.> wrote in message
>>> news:4738b9ee$0$14148$742ec2ed@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
Re: htaccess rewrite question
am 14.11.2007 00:25:11 von shimmyshack
On Nov 12, 8:44 pm, "G" <.@.> 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