We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 27051
    • 5 Posts
    Heya, new user here.

    The whole day, I’ve been working on getting my FURL to work properly. I have enabled friendly URL and all that, as all the guides say and the links are showing as http://localhost/mywebsite/thealias, but the links are not working with the alias at all. Though, it works if I put in the ID of the resource instead and I can’t seem to get it working with the alias.

    http://localhost/mywebsite/2 works. http://localhost/mywebsite/thealias does not. sad

    My .htaccess config looks something like this:
    #Options +FollowSymlinks
    RewriteEngine On
    RewriteBase /mywebsite
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.*)$ index.php?q=$1 [L,QSA,NC]
    
    RewriteCond %{HTTP_HOST} ^localhost/mywebsite$
    RewriteRule ^(.*)$ http://localhost/mywebsite/$1 [R=301,L]


    Is the .htaccess the fault here, or could it be my resource setup? I’ve really given up at this point. embarrassed
      • 3749
      • 24,544 Posts
      Make sure you have this in the <head> section of your templates:

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


      Try using just this (comment out those last two lines):

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


      You shouldn’t need to specify the domain in the rules, just in the rewrite base.

        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
        • 27051
        • 5 Posts
        Quote from: BobRay at Oct 09, 2010, 06:52 PM

        Make sure you have this in the <head> section of your template:

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


        Try using:

        rewrite base /




        I’ve made sure that I have the base tag in the head, and it’s there. If I use RewriteBase /, it redirects to http://localhost/xampp (which is default as http/localhost should redirect me there, I think).

        EDIT:

        Maybe I should mention that my links look like this:
        <a href="[[~2]]">Link</a>
          • 27051
          • 5 Posts
          Still can’t get it to work. Do you possibly need more resources from my part?
            • 26555
            • 38 Posts
            Same problem here on Windows.
            IDs work fine, but Aliases won’t.
              • 26555
              • 38 Posts
              Here are my url system settings ("Ja" means "Yes" btw wink).
              Any ideas?
                • 1778
                • 659 Posts
                Did you try automatic alias set to No ?
                Not sure if this can have any impact but...
                An other question, do you use any special characters in your aliases ? (or accentuated ...maybe)
                Cheers
                  • 27051
                  • 5 Posts
                  Quote from: anso at Oct 10, 2010, 10:05 AM

                  Did you try automatic alias set to No ?
                  Not sure if this can have any impact but...
                  An other question, do you use any special characters in your aliases ? (or accentuated ...maybe)
                  Cheers

                  Automatic Aliases is off in my setting and I don’t use any special characters. It’s all in lowercase too, if that would do any impact on the URL’s.
                    • 26555
                    • 38 Posts
                    OK, in my case it was quite a no-brainer.
                    Turned out aliases actually worked with ".html" which is the default setting for Revolution.
                    Since the "suffix" setting is deprecated, you can simply edit your Content-Types settings and remove the ".html" suffix, if you don’t want it in your URLs.
                    Furthermore I deactivated the "use_alias_path" setting.

                    Works fine for me now.
                    As well as i18n via contexts. Yey! smiley
                      • 27051
                      • 5 Posts
                      Quote from: sebwebdev at Oct 10, 2010, 10:42 AM

                      OK, in my case it was quite a no-brainer.
                      Turned out aliases actually worked with ".html" which is the default setting for Revolution.
                      Since the "suffix" setting is deprecated, you can simply edit your Content-Types settings and remove the ".html" suffix, if you don’t want it in your URLs.
                      Furthermore I deactivated the "use_alias_path" setting.

                      Works fine for me now.
                      As well as i18n via contexts. Yey! smiley

                      Oh my, I set my content type back to HTML (Had a custom one before) and it started to work for me aswell. grin