<?php if(!empty($_GET['username'])) { $username = $_GET['username']; } else if(!empty($_SESSION['username'])) { $username = $_SESSION['username']; } else { header("Location: login.php"); die(); } ?>
RewriteEngine On RewriteRule ^([a-zA-Z0-9_-]+)$ profile.php?username=$1
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)