thedigicraft / Atom.CMS

Atom.CMS
56 stars 52 forks source link

Open home page always when domain name is on the address bar - Video 51 #147

Closed ghost closed 8 years ago

ghost commented 8 years ago
<?php
    /*Setup File:

    */

    error_reporting(0);

    #Database Conection here

    include('config/connection.php');

    #Functions:

    include ('functions/sandbox.php');

    include ('functions/data.php');

    include ('functions/template.php');

    if(!isset($path['call_parts'][0]) || $path['call_parts'][0] == ''){

                                        //$path['call_parts'][0] = 'home';

                                        header('Location: home');

                                        }

    #Page Settings:

    $path = get_path();

    $debug = data_status($dbc, 'debug-status');

    #Page Setup:

    $page = data_page($dbc, $path['call_parts'][0]);

    $site_title = 'Plataforma de E-Commerce';

    $page_title = 'Home';

?>
thedigicraft commented 8 years ago

@ricmach Could you take a screen shot of the error?

creptor commented 8 years ago

I don't get what're you trying to do, but if you correctly configured the .htaccess it will make your site always redirect to index.php or index.html.

ghost commented 8 years ago

I'm Portuguese and I'm trying to change the Firefox language settings but without success.

I post below the error but I understand it's dificult for you to understand because it's Portuguese but I'm going to continuing trying to change the language of Firefox.

error_message

thedigicraft commented 8 years ago

Is your site hosted on your local computer or is it hosted somewhere we can look at it?

ghost commented 8 years ago

I am working in my computerbin a localhost.

creptor commented 8 years ago

ho, I see the error..... the if("page exists") must be after the $path = get_path(); and not before it, or else it would never be defined :smile: (creating that loop).

creptor commented 8 years ago

just remember that every variable must or should be after the functions are defined :3

thedigicraft commented 8 years ago

@creptor good catch!