Open juggernautsei opened 3 years ago
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.
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
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?
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.
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.
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/
I loaded the boilerplate and when I click the link to Get started the /admin can not be found. What should I do now?