Problem with navigation

inam

New member
I work with my db with following .htaccess conf: Options All -Indexes

RewriteEngine On

RewriteRule ^([-a-zA-Z0-9]+)$ index.php?route=$1

When I upload to online server the navigation not works shows 404 not found and work well.
Options All -Indexes
RewriteEngine On

Redirect Trailing Slashes…​

RewriteRule ^([-a-zA-Z0-9]+)$ index.php?route=$1

Handle Front Controller…​

RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [L]

Now I change to EXE but when I click on navigation it pops up save dialog box 😥 help me how I fix that.
Capture

instead of redirect to home show save dialog
 
Last edited:
thanks is there easy way to redirect.I have home page after login then two more pages can not access.
 
inam said:
is there easy way to redirect
I have faced issues “kind of” like yours. What I did was was use a cavewoman style.

What I mean is, I used if and else php statements. if = something, do it or else.

Not ideal but may give you some ideas.
 
thanks I write my code with htaccess conf:
if(isset($_SESSION[“loggedIn”]) && $_SESSION[“loggedIn”] == “ok”){
Code:
  echo '<div class="wrapper">';
  include "modules/header.php";
  include "modules/sidebar.php";
  if(isset($_GET["route"])){

    if ($_GET["route"] == 'home' || 
        $_GET["route"] == 'users' ||
        $_GET["route"] == 'lists' ||
        $_GET["route"] == 'items' ||

        $_GET["route"] == 'logout'){

      include "modules/".$_GET["route"].".php";

    }else{

       include "modules/404.php";
    
    }

  }else{

    include "modules/home.php";
  
  }

  include "modules/footer.php";

  echo '</div>';

}else{
  include "modules/login.php";
}
 require_once "controllers/template.controller.php";
require_once “controllers/users.controller.php”;
require_once “controllers/lists.controller.php”;
require_once “controllers/items.controller.php”;

require_once “models/users.model.php”;
require_once “models/lists.model.php”;
require_once “models/items.model.php”;

$template = new ControllerTemplate();
$template -> ctrTemplate();
?>

my htaccess :
RewriteEngine On
RewriteRule ^([-a-zA-Z0-9]+)$ index.php?route=$1
 
Last edited:
Can tell you are advanced coder:)

When I first started with exeout, took many hours finding work arounds because cannot use htaccess. The scripting is very powerful but I have never mastered it and wish exeout people would write up good examples / cookbook.
 
thanks I read many articles and questions all of them saying without apache htaccess there is no way. but I think we can do it on HEScript.
 
Back
Top