inam
December 31, 2020, 2:39pm
#1
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.
instead of redirect to home show save dialog
htaccess is not support by EXEout. It does not run apache…
inam
January 1, 2021, 5:26am
#3
thanks is there easy way to redirect.I have home page after login then two more pages can not access.
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.
inam
January 2, 2021, 8:43pm
#5
thanks I write my code with htaccess conf:
if(isset($_SESSION[“loggedIn”]) && $_SESSION[“loggedIn”] == “ok”){
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
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.
inam
January 3, 2021, 3:37am
#7
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.
You can define redirection rules in HEScript as explained in the documentation:
or define a router in PHP (a router script) and define it as the startup URL (or define it in your PHP script that plays the role of the index page):
inam
January 5, 2021, 1:04pm
#9
resolved by using complete URL.
1 Like