We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 23831
    • 23 Posts
    Hello, I am having some problems configuring my .htaccess file. I have the file renamed .htaccess but I’m trying to figure out how to have a page name become the alias name. Instead of "tutorials.lottmandesign.com/index.php?id=2" I would like to have it show up "tutorials.lottmandesign.com/blog".

    I have the site set up at tutorials.lottmandesign.com Even though the pages are there, they don’t actually link to anything because it’s like I confused the code or something. When I preview the other pages in Modx it shows up as http://tutorials.lottmandesign.com/index.php?id=2... But if you go to tutorials.lottmandesign.com and click Blog, it’s looking for the alias name.

    Sorry I just need help in bad way. Any help would be much appreciated.
      • 1343 ☆ A M B ☆
      • 2,213 Posts
      Hello,

      Did you change the setting in the control panel to enable it?
        Patrick | Server Wrangler
        About Me: Website | Tweets |  MODX Hosting
        • 23831
        • 23 Posts
        Yes I did. I set it up just like another website I maintain with Modx. Unfortunately, I didn’t do the original install so I’m not sure what to do with the .htaccess file.
          • 8609
          • 607 Posts
          Seems to be working fine on my end
            • 22427
            • 793 Posts
            AFAIK, even with Friendly URLs enabled, if you do a preview out of the manager the address line will not show the alias URL - don’t know why (maybe the .htaccess is ignored in that case).
              • 3749
              • 24,544 Posts
              Quote from: ottogal at Mar 23, 2010, 10:43 PM

              AFAIK, even with Friendly URLs enabled, if you do a preview out of the manager the address line will not show the alias URL - don’t know why (maybe the .htaccess is ignored in that case).

              That’s right. You can look at the site in another browser where you’re not logged into the Manager to see a true preview.
                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
                • 23831
                • 23 Posts
                Quote from: BobRay at Mar 23, 2010, 11:41 PM

                Quote from: ottogal at Mar 23, 2010, 10:43 PM

                AFAIK, even with Friendly URLs enabled, if you do a preview out of the manager the address line will not show the alias URL - don’t know why (maybe the .htaccess is ignored in that case).

                That’s right. You can look at the site in another browser where you’re not logged into the Manager to see a true preview.

                Thank you so much. I didnt realize I had to use a different browser... Very weird... It has never done that before but oh well, it works and that is all Im concerned about.
                  • 28042 ☆ A M B ☆
                  • 24,524 Posts
                  That’s because this is the code for it:
                  <li id="Button5"><a href="#" onclick="<?php echo "window.open('../index.php?id=$id','previeWin')"?>"><img src="<?php echo $_style["icons_preview_resource"] ?>" /> <?php echo $_lang['preview']?></a></li>
                  

                  So it uses javascript to specifically open a window with the URL index.php?id=xx. No friendly URLs used here.

                  Seems to me it could run the $id through the $modx->makeURL($id) function...
                    Studying MODX in the desert - http://sottwell.com
                    Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
                    Join the Slack Community - http://modx.org