Connecting Tech Pros Worldwide Help | Site Map

mod_rewrite help

tj111's Avatar
Newbie
 
Join Date: Aug 2007
Posts: 12
#1: Sep 14 '07
I'm fairly new when it comes to Apache, but regular expressions aren't really an issue for me. I'm designing a new website for one of the companies I'm employed by. I test it and run it locally, and when it is all done it will be uploaded to our vps , so I have been using website root based absolute links for everything.

However now my boss wants the ability to access it over the intranet, and my intranet account is the standard /~user/ account, so it obviously causes major issues. I've been rewriting this mod_rewrite in an .htaccess all day, as well as foraging through old forum posts on google, and still haven't been able to get it to work. Any help from an apache pro would be great (our server guy is mysteriously missing today |-_-| ).

Expand|Select|Wrap|Line Numbers
  1. RewriteEngine on
  2. RewriteCond %{THE_REQUEST} /[^~]\w+[/\w.-]*
  3. RewriteRule \s/([\w.-/]*) /~mynamehere/$1
  4.  
Reply