We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 53255
    • 6 Posts
    I have a modx 2.5.6 install but friendly urls are giving a 404 error for public/index.php

    I have the following directory structure

    core
    public/assets
    public/connectors
    public/manager

    .htaccess file is in the public folder

    If i browse to http://localhost/test/public/ i get my home page. I have <base href="[(site_url)]"></base> in my template and my .htaccess file looks like this

    Options +FollowSymlinks
    RewriteEngine On
    RewriteBase /public


    # The Friendly URLs part
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.*)$ index.php?q=$1[L,QSA]

    http://localhost/test/public/home or http://localhost/test/public/about give 404.

    Help please, i've already tried dozens of suggestions in other threads.

    thanks

    This question has been answered by sergeaubin. See the first response.

      • 17301
      • 932 Posts
      Have you tried

      RewriteBase /public/
        ■ email: [email protected] | ■ website: https://alienbuild.uk

        The greatest compliment you can give back to us, is to spend a few seconds leaving a rating at our trustpilot: https://uk.trustpilot.com/review/alienbuild.uk about the service we provided. We always drop mention of services offered by businesses we've worked with in the past to those of interest.
        • 53255
        • 6 Posts
        Quote from: lkfranklin at Apr 05, 2017, 10:06 AM
        Have you tried

        RewriteBase /public/

        Yes i have.
          • 3749
          • 24,544 Posts
          Do you have this tag (with the exclamation point) in the head section of all templates:

          <base href="[[!++site_url]]" />

            Did I help you? Buy me a beer
            Get my Book: MODX:The Official Guide
            MODX info for everyone: http://bobsguides.com/modx.html
            My MODX Extras
            Bob's Guides is now hosted at A2 MODX Hosting
          • discuss.answer
            • 53255
            • 6 Posts
            Quote from: BobRay at Apr 05, 2017, 04:22 PM
            Do you have this tag (with the exclamation point) in the head section of all templates:

            <base href="[[!++site_url]]">


            go it working thanks bobray