From owner-freebsd-questions@FreeBSD.ORG Fri Jul 13 14:51:49 2012 Return-Path: Delivered-To: questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 8FAAB1065677 for ; Fri, 13 Jul 2012 14:51:49 +0000 (UTC) (envelope-from david+dated+1342623098.665e12@skytracker.ca) Received: from 3s1.com (3s1.com [209.161.205.12]) by mx1.freebsd.org (Postfix) with ESMTP id D7CB18FC08 for ; Fri, 13 Jul 2012 14:51:48 +0000 (UTC) Received: from 3s1.com (localhost [127.0.0.1]) by 3s1.com (8.14.4/8.14.4) with ESMTP id q6DEpdIf056539 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Fri, 13 Jul 2012 10:51:40 -0400 (EDT) (envelope-from david+dated+1342623098.665e12@skytracker.ca) Received: (from david@localhost) by 3s1.com (8.14.4/8.14.4/Submit) id q6DEpcVr056527 for questions@freebsd.org; Fri, 13 Jul 2012 10:51:38 -0400 (EDT) (envelope-from david+dated+1342623098.665e12@skytracker.ca) X-Authentication-Warning: 3s1.com: david set sender to david+dated+1342623098.665e12@skytracker.ca using -f Received: by 3s1.com (tmda-sendmail, from uid 1000); Fri, 13 Jul 2012 10:51:38 -0400 Date: Fri, 13 Jul 2012 10:51:37 -0400 To: questions@freebsd.org Message-ID: <20120713145137.GA53674@skytracker.ca> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4.2.3i X-Delivery-Agent: TMDA/1.1.12 (Macallan) From: David Banning Cc: Subject: mod_rewrite problem with tilde X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Jul 2012 14:51:49 -0000 I am migrating to a new server location which right now has no domain name, so the ip address is being used. The ISP gives an address for the apache directory like so; http://184.154.230.2/~smartst2/ A simple redirect works, such as this one which directs to another site; Options +FollowSymLinks rewriteEngine on rewriteRule ^test\.html$ http://www.somesite.com/index.php [R=301,L] but a redirect within the site does not work. I wonder if it has to do with the tilde ~ character that the ISP has configured. I presently have the following .htaccess; RewriteEngine on RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-l RewriteRule ^[^/]*\.php$ / RewriteRule ^[^/]*\.html$ index.php Which does not work. If anyone is aware of problems using mod_rewrite with the ~ character or could contribute any pointers as to how I could gain more information on - for instance -where- mod_rewrite is -attempting- to redirect (considering my above .htaccess.