Welcome to HostingForumz.com!
FAQFAQ      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

htaccess rewrite question

 
   Web Hosting Problem Solving Community! (Home) -> Apache RSS
Next:  working with wsus 3.0  
Author Message
G

External


Since: Jul 30, 2007
Posts: 58



(Msg. 1) Posted: Mon Nov 12, 2007 12:44 pm
Post subject: htaccess rewrite question
Archived from groups: alt>apache>configuration (more info?)

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

 >> Stay informed about: htaccess rewrite question 
Back to top
Login to vote
D. Stussy

External


Since: Nov 01, 2007
Posts: 25



(Msg. 2) Posted: Mon Nov 12, 2007 3:07 pm
Post subject: Re: htaccess rewrite question [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

"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.

 >> Stay informed about: htaccess rewrite question 
Back to top
Login to vote
G

External


Since: Jul 30, 2007
Posts: 58



(Msg. 3) Posted: Mon Nov 12, 2007 4:10 pm
Post subject: Re: htaccess rewrite question [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

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?
 >> Stay informed about: htaccess rewrite question 
Back to top
Login to vote
D. Stussy

External


Since: Nov 01, 2007
Posts: 25



(Msg. 4) Posted: Mon Nov 12, 2007 6:12 pm
Post subject: Re: htaccess rewrite question [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

"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.
 >> Stay informed about: htaccess rewrite question 
Back to top
Login to vote
G

External


Since: Jul 30, 2007
Posts: 58



(Msg. 5) Posted: Tue Nov 13, 2007 8:09 am
Post subject: Re: htaccess rewrite question [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

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
 >> Stay informed about: htaccess rewrite question 
Back to top
Login to vote
shimmyshack

External


Since: Jun 07, 2007
Posts: 75



(Msg. 6) Posted: Tue Nov 13, 2007 7:01 pm
Post subject: Re: htaccess rewrite question [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

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
 >> Stay informed about: htaccess rewrite question 
Back to top
Login to vote
Display posts from previous:   
Related Topics:
.htaccess rewrite - Hello. I'm trying to redirect all requests from http://domain1.com/* to http://domain2.com/* I have the following in my .htaccess file in the doc root of domain1.com: RewriteEngine on RewriteCond %{REQUEST_URI} !-U RewriteRule ^(.+) ..

Need help with .htaccess rewrite - Hiyee I've been googling for a whole day now and can't find a decent example/guide/howto on the various variables, and functions available for Rewriting and Redirecting using only a .htaccess file. I have one host with multiple domain names (it's..

Rewrite with .htaccess, php on linux - I am trying to achieve this solution of having pages served statically by the web server. The URL rewriting is occuring, but I can't get the server to output the file as an .html page. Is there something similar in .php to force the output of the query t...

rewrite conditions in .htaccess - Hi there, I am wondering how to write a condition which is true for http and https I tryed to replace the s with *, but this did not work as expected. Have a look: RewriteCond %{HTTP_REFERER} !^http*://www.servername.*$ [NC] Is there a special..

Beautify URL with apache rewrite or <file> in .htaccess - Hi I searched the web nearly the whole day and found some solutions which may solve me needs. i like to hide my dynmaic url index.php?a=1&b=2 wirth anything else which ends with .html but let me pass information in the url. First i tried : <File...
   Web Hosting Problem Solving Community! (Home) -> Apache All times are: Pacific Time (US & Canada) (change)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum



[ Contact us | Terms of Service/Privacy Policy ]