• Anonymous User 17118946

    (@anonymized-17118946)


    Hello,
    I’ve added a WordPress blog page to my previously working website. I did it by instaling WordPress in a directory named “blog” inside my “/public” laravel directory. So I could access the blog by going to “patrikzk.eu/blog” and have my old website functioning normally elsewhere. I’ve set the site address in general settings to “https://patrikzk.eu/blog” instead of “https://patrikzk.eu/public/blog”.

    Everything works without problems except when the homepage is set to show recent posts instead of a static page, WordPress shows two different things depending on whether there is a slash or not – “patrikzk.eu/blog/” shows correct homepage with recent posts, but “patrikzk.eu/blog” (without a slash at the end) shows a random page from pages that I have in WordPress, but not recent posts.

    I tried to reroute using laravel from “/blog” to “/blog/” or “/public/blog/”, but it doesn’t seem to have any effect.

    • This topic was modified 5 years, 6 months ago by Anonymous User 17118946.

    The page I need help with: [log in to see the link]

Viewing 2 replies - 1 through 2 (of 2 total)
  • That’s a strange error. What are your permalink settings?

    Thread Starter Anonymous User 17118946

    (@anonymized-17118946)

    There are two warnings in permalink settings at the top:

    Warning: is_writable(): open_basedir restriction in effect. File(/) is not within the allowed path(s): (/data/web/virtuals/97874/virtual) in /data/web/virtuals/97874/virtual/www/public/blog/wp-admin/options-permalink.php on line 88

    Warning: is_writable(): open_basedir restriction in effect. File(/) is not within the allowed path(s): (/data/web/virtuals/97874/virtual) in /data/web/virtuals/97874/virtual/www/public/blog/wp-admin/includes/misc.php on line 220

    Common settings are set to “Post name” and at the bottom, there is this message:

    “If your .htaccess file was writable, we could do this automatically, but it isn’t so these are the mod_rewrite rules you should have in your .htaccess file. Click in the field and press CTRL + a to select all.

    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /blog/
    RewriteRule ^index\.php$ – [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /blog/index.php [L]
    </IfModule>

    … I tried to change the .htaccess file and either add this to the original or replace it or just add the things that are different, but it breakes the page.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘WordPress installed in Laravel public directory, trouble with urls’ is closed to new replies.