This question already has an answer here:
In our site we are implementing a free registration system so that we can allow people to access secure personal information but we need this file to redirect if they access it directly any help would be greatly appreciated
<?php
include("../../account/core/init.php");
logged_in_redirect();
?>
<!DOCTYPE html>
<html lang="en">
<head>
<?php include '../../bundles/base/inc/head.php'; ?>
</head>
<body>
<?php include("../../bundles/base/inc/header.php"); ?>
<div class="container page clearfix account-activation">
<?php if(isset($_GET['email'], $_GET['email_code'])) {
echo 'This is where the account will be activated';
} else {
header('Location: https://www.oursite.org/');
exit();
}
?>
</div>
<?php include("../../bundles/base/inc/footer.php"); ?>
</body>
</html>
This is our code for out https://www.oursite.org/account/private/secure/activation/ We keep getting this error:
Warning: Cannot modify header information - headers already sent by (output started at /route/to/site/public_html/account/private/secure/activation/index.php:9) in /route/to/site/public_html/account/private/secure/activation/index.php on line 17
#
.htaccess file
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /?username=$1
You access the profile by account/profile/?username=user But i'm trying to rewrite it to account/profile/user/
</div>