I'm having problem in detecting the single slash only in the URL, the URL which I want is
through this Rewrite RULE i can capture the username but its also valid for leading slashes as well which is unwanted.
RewriteRule ([A-Za-z0-9]+){0,1}$ index.php?c=profile&val=$1 [NC,L]
^
starting sign returns nothing so I've removed it, Right now I'm testing it over local host so my test url is
http://localhost/projectname/username
on server its
http://sitename.com/username
this is my complete .htaccess
RewriteEngine On
RewriteBase /projectname/
RewriteCond $1 !^(maintainance\.php|index\.php|files|images|robots\.txt|css|js)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [PT,L]
RewriteRule ^([A-Za-z0-9]+){0,1}$ index.php?c=profile&val=$1 [NC,L]
Can anyone please tell me how can I capture the single slash username throught rewriteRule
any help would be greatly appreciated.
Thanks