I have a problem with my .htacces
I have set $base_url() from my db.php connection like this
<?php
define('DB_SERVER', 'localhost');
define('DB_USERNAME', 'root');
define('DB_PASSWORD', 'root');
define('DB_DATABASE', 'wall3');
$connection = mysql_connect(DB_SERVER, DB_USERNAME, DB_PASSWORD) or die(mysql_error());
$database = mysql_select_db(DB_DATABASE) or die(mysql_error());
mysql_query ("set character_set_results='utf8'");
$path = "uploads/";
$profile_path="user_profile_uploads/";
$perpage=10; // Updates perpage
$base_url='http://www.ecoshoptr.com/';
$gravatar=0; // 0 false 1 true gravatar image
$rowsPerPage=10; //friends list
?>
The problem is $base_url does routing. For example: When i click the user profile image from like this image:
Does not direct me to the user profile.
However, URLs to open the user's url. If you look at the second picture you can see the opened pages is index.php page, but the url address URLs users
This is my .htaccess inside:
RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_HOST} ^ecoshoptr\.com$
RewriteCond %{REQUEST_URI} !^/$1
RewriteRule (.*) http://www.ecoshoptr.com/$1 [r=301,nc]
RewriteRule ^([a-zA-Z0-9_-]+)/?$ index.php?id=$1
<div id='header'>
<img src='<?php echo $base_url;?>wall_icons/blacklogo.png'/>
<span style='float:right'>
<ul id='nav'>
<?php if($login) { ?>
<li><a href="<?php echo $index_url; ?>">Home</a></li>
<li><a href="<?php echo $base_url.$session_username; ?>">Profile</a></li>
<li><a href="<?php echo $base_url.'friends/'.$session_username; ?>">Friends</a></li>
<li>
<?php if($session_conversation_count>0) {
echo "<span id='conversation_count'>$session_conversation_count</span>";
} ?>
<a href="<?php echo $base_url.'messages.php'; ?>">Messages</a></li>
<li><a href="<?php echo $base_url.'settings.php'; ?>">Setting</a></li>
<li><a href="<?php echo $base_url.'logout.php'; ?>">Logout</a></li>
<?php } else { ?>
<li><a href="<?php echo $index_url; ?>">Login</a></li>
<li><a href="<?php echo $index_url; ?>">Sign Up</a></li>
<?php } ?>
</ul>
</span>
</div>
Home, settings, logout button is working but other buttons is not working.
How do I solve this problem Can you help me thanks!