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; } Link to comment https://forums.phpfreaks.com/topic/61965-solved-trouble-with-a-mod_rewrite/ 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 Link to comment https://forums.phpfreaks.com/topic/61965-solved-trouble-with-a-mod_rewrite/#findComment-308578 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.