Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Login page missing #9

Open
juggernautsei opened this issue May 5, 2021 · 6 comments
Open

Login page missing #9

juggernautsei opened this issue May 5, 2021 · 6 comments

Comments

@juggernautsei
Copy link

I loaded the boilerplate and when I click the link to Get started the /admin can not be found. What should I do now?

@HansSchouten
Copy link
Owner

HansSchouten commented May 5, 2021

Did you install PHPageBuilder into the directory of the boilerplate? And did you setup the config.php correctly. You need to configure your project's base URL in the config file.

@luispcar
Copy link

luispcar commented Jun 9, 2021

I loaded the boilerplate and when I click the link to Get started the /admin can not be found. What should I do now?

You probably didn't upload the .htaccess file

@MassimilianoSaldan
Copy link

MassimilianoSaldan commented Feb 19, 2022

Hi Hans,

I find myself in this situation (see image).
when i click the link to get started, /admin cannot be found. What should I do now?
page-builder

@ochen1
Copy link

ochen1 commented Dec 28, 2022

I finally solved this.

Put all the contents of PHPagebuilder-boilerplate in the root of your public directory. Don't forget to move the .htaccess file.

.htaccess should look like this (requires changes):

<IfModule mod_rewrite.c>
    RewriteEngine On

    # Remove any trailing slashes from non-directories using a redirect
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_URI} (.+)/$
    RewriteRule ^ %1 [R=301,L]

    # Rewrite /themes/{theme}/{file} to /themes/{theme}/public/{file}
    RewriteRule ^themes/([^/]+)/(?!public/)(.*)$ themes/$1/public/$2 [L]

    # Rewrite non-directory and non-file URLs to index.php
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteRule ^ index.php [L]

    # Allow direct access to theme files with URL format: /themes/{theme}/public/{file}
    RewriteRule ^themes/([^/]+)/public/(.*)$ themes/$1/public/$2 [L]

    # Allow direct access to uploaded files with URL format: /uploads/{filepath;,}
    RewriteRule ^uploads/(.*)$ uploads/$1 [L]

    # Rewrite all remaining requests to index.php
    RewriteRule ^ index.php [L]
</IfModule>

mod_rewrite needs to be enabled using sudo a2enmod rewrite (source). You will need to restart apache2 after enabling the module. MySQL config needs to be working, including root password access (source) and password auth (source). Make sure to use 127.0.0.1 instead of localhost as the host (source). Read instructions in the config files carefully and comment/uncomment the lines as necessary.

@ochen1
Copy link

ochen1 commented Dec 28, 2022

Oh yeah, and if you tested the old .htaccess config on a browser, the permanent redirect will still be stored in the disk cache, so you'll need to use incognito or disable cache via the Network tab of DevTools.

@ochen1
Copy link

ochen1 commented Dec 28, 2022

Oh and don't forget to enable .htaccess files in apache config if they are disabled, following this guide https://www.linode.com/docs/guides/how-to-set-up-htaccess-on-apache/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants