devknob Posted July 27, 2007 Share Posted July 27, 2007 I put this in the .htaccess file, my host swore up and down mod_rewrite is installed, but i diddnt find it in <?php phpinfo(); ?> so is there something wrong with my code here? --------this is in the htaccess file Options +FollowSymLinks Options +Indexes RewriteEngine on RewriteBase / RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^([^/]+)/$ /profile.php?redir=$1 [L] -------this is in profile.php if(isset($_GET['redir'])) { $redir = $_GET['redir']; $rs = mysql_query("SELECT id, redir FROM users WHERE redir='$redir'"); $row = mysql_fetch_object($rs); $id = $row->id; } Quote Link to comment Share on other sites More sharing options...
devknob Posted July 27, 2007 Author Share Posted July 27, 2007 ^([A-Za-z0-9-]+)/?$ instead of ^([^/]+)/$ made it totally work FYI for whoever Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.