In my .htaccess file i have the following re-write rule
RewriteRule ^([a-z]*)$ work.php?album=$1 [L]
I am reading all directories in root directoy and creating links like
code in PHP
$dir=glob('images/works/*');
$dir_listing=array();
foreach($dir as $list)
{
if(is_dir($list))
$dir_listing[]= (basename($list));
}
foreach($dir_listing as $folders )
echo"<a href='$folders' ><img src='Default-thumbnail-folder.jpg' /> </a>";
the problem is i have three folders under works directory {alb,ban,bas}
the first and last {alb and bas} work properly for my redirect rule URL{siteName/works/bas}
but the second {ban} creates a URL like {siteName/works/ban/} Notice the extra "/" is creating the problem, it seems for some folder names it is creating the problem, so please help me in creating a proper redirect rule
i want a link like
<a href="alb" >About</a> // to redirect to work.php?content=about
I also notice that if URL in browser is like work/alb/ CSS is not applied i tried
<link href="sample.css" rel="stylesheet" type="text/css" />
and
<link href="css/sample.css" rel="stylesheet" type="text/css" />
it does not work for URL like {works/about/} it works for {works/about}