Hey guys, I have a little problem I've run into.
Okay, I've got Short URL's running on my server and the .htaccess file looks like this:
RewriteEngine on
RewriteBase /
RewriteCond %{REQUEST_URI} !^.*/admin/
RewriteCond %{REQUEST_URI} !^.*/blog/
RewriteCond %{REQUEST_URI} !^.*/browse/
RewriteCond %{REQUEST_URI} !^.*/forum/
RewriteCond %{REQUEST_URI} !^.*/member/
RewriteCond %{REQUEST_URI} !^.*/music/
RewriteCond %{REQUEST_URI} !^.*/signup/
RewriteCond %{REQUEST_URI} !^.*/user/
RewriteRule ^([^/\.]+)?/?([^/\.]+)?/?([^/\.]+)?/?([^/\.]+)?/?$ profile.php?user=$1&ht_url=true [L]
And then I have some code that when Clicked - it adds a song from An Artists Webpage to the persons page who clicked it (similar to myspace) and it looks like:
if(isset($_GET['music_id']))
{
if($VAR[4] == "")
{
$msg_music_added = "You need to sign in first to add music to your profile." . $VAR[4];
}
else
{
$sql = "UPDATE user set user_music=$_GET[music_id] where user='$VAR[4]'";
//echo $sql;
$result = mysql_query($sql);
if($result)
{
$msg_music_added = "The music has been successfully added in your profile.";
}
else
{
$msg_music_added = "The music could not be added in your profile.";
}
}
}
and then:
<a href='profile.php?id=$_GET[id]&music_id=$row[id]'>add to profile</a>
Now with Short URLs turned off, this code works fine but with Short URL's on - it doesn't seem to work. It doesn't give me any errors but it doesn't work.
My Question is - would the HTACCESS file creating the Short URL's be messing up the code I'm using? Logically it seems that it would... but I'm somewhat of a Noob, again and somethings telling me I'm wrong - that the problem is coming from somewhere else.
ANy help would be greatly appreciated!
Oh yeah - the short URL's are going from:
/profile.php?id=5
to:
/username