banago/simple-php-website

Pages doesen't work if the files are not in root directory

Closed this issue · 2 comments

Thank you for this simple and amazing code,

however, I notice that if the files are not in root directory ex: **www.mysite.com/phpsite/**index.php, the links of content doesn’t work.

How can be this resolved?

Thank you

Just remove the '/' from functions.php - navMenu function.

Other solutions could be base tag, htaccess solutions etc.

Hope it helps :)

@Petrus08 and @FatihHyusein this is now solved. I've introduced site_url config element on config file so that you can set your site url to your desired url and that will be used to produce the pages urls too. For example:

'site_url' => 'http://mysite.com/phpsite'

Grab the latest version.