Jump to content

[SOLVED] trouble with a mod_rewrite


devknob

Recommended Posts

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.