We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 7231
    • 4,205 Posts
    I think I have it setup correctly but no matter what I do it will not work. The instructions are not clear how to fill in the aliases field.
    Omit any leading or trailing slashes as well as the default suffix (usaully .html)
    I am trying to go from domain.com/page.php >> to >> domain.com/page.html

    I also have strict URLs installed, could there be a conflict?

      [font=Verdana]Shane Sponagle | [wiki] Snippet Call Anatomy | MODx Developer Blog | [nettuts] Working With a Content Management Framework: MODx

      Something is happening here, but you don't know what it is.
      Do you, Mr. Jones? - [bob dylan]
      • 20413
      • 2,877 Posts
      Shouldn’t be any problem with SEO Strict URL

      Example scenario, with FURLs turned on and ’.html’ as the FURL suffix:

      http://yoursite.com/site_start.html -> http://yoursite.com/
      http://yoursite.com/feed.rss.html -> http://yoursite.com/feed.rss (TV override, with basename set)
      http://yoursite.com/container.html -> http://yoursite.com/container/ (if rewrite containers as folders is enabled or TV override)

      Currently known limitations:
      - Will only rewrite links with double quotes
      - Will not rewrite URLs with relative paths (../.. etc)

      http://modxcms.com/SEO-Strict-URLs-1335.html
        @hawproductions | http://mrhaw.com/

        Infograph: MODX Advanced Install in 7 steps:
        http://forums.modx.com/thread/96954/infograph-modx-advanced-install-in-7-steps

        Recap: Portland, OR (PDX) MODX CMS Meetup, Oct 6, 2015. US Bancorp Tower
        http://mrhaw.com/modx_portland_oregon_pdx_modx_cms_meetup_oct_2015_us_bancorp_tower
        • 16085
        • 203 Posts
        @dev_cw, if your page is called ’page-01.html’ the new page or allises would be set to ’page-02’ or ’new-page-02’ or ’new-new-page-02’. Whatever you do just don’t add the suffix in your TV area, ie ’new-page-02.html’.

        Not sure about SEO Strict as I stopped installing that and removed the default .html suffix from my fURL configuration so I can set it instead.
          • 7231
          • 4,205 Posts
          Thanks, but it is still not working. I tested the Missing plugin and it worked fine but my client liked the idea of a tv to manage the aliases so I guess I have to make it work.

          Here is the setup:
          The current document has an alias of my_doc and the FURL setting use the .html sufix so the page alias is my_doc.html
          In the Aliases TV I have: my_doc.php which is the old page alias.

          But if I try to reach my_doc.php I get 404 page not found.

          I tried the suPHP hacks described in another post just in case and they had no effect. I also double checked the .htaccess file and all is normal there. Not sure what to try next?
            [font=Verdana]Shane Sponagle | [wiki] Snippet Call Anatomy | MODx Developer Blog | [nettuts] Working With a Content Management Framework: MODx

            Something is happening here, but you don't know what it is.
            Do you, Mr. Jones? - [bob dylan]
            • 26931
            • 2,314 Posts
            Hi!

            i’ve got the SeoStrict-Urls plugin working and use alias names with suffixes in an 9.6.1p2 Installation, and it’s no problem...i’m not sure if i understand you right
            In the Aliases TV I have: my_doc.php which is the old page alias.
            do you set the suffix in the document settings Alias-TV? ...i just type in the name i want to have, and the suffix will change accordingly to the settings i give them in tools -> configuration -> friendly urls

            if i’m changing the suffix from .php to .html though, i get an 404 for the first page refresh, but when i’m clicking any link in the menu, the page works fine with the new suffix...i hope i could help?! smiley

            cheers, j
              • 7231
              • 4,205 Posts
              The website is set to use .html and that is set in the site configuration. But we need the virtual alias with the suffix .php for a few pages that get external references. If I change the suffix to .php then all the .html pages will break.

              Maybe i am not understanding Virtual Aliases correctly, I thought that I could use it to redirect URLs from an old site to the new document on the new site. Maybe it is just to have multiple aliases with the exact same suffix.

              Since Missing works i will see if I can adapt it to use a TV for the alias rather than a hard coded array.

              Thanks for your help, much appreciated. grin
                [font=Verdana]Shane Sponagle | [wiki] Snippet Call Anatomy | MODx Developer Blog | [nettuts] Working With a Content Management Framework: MODx

                Something is happening here, but you don't know what it is.
                Do you, Mr. Jones? - [bob dylan]
                • 36592
                • 970 Posts
                Are you probably using alias path ?
                And the document you are testing is a child document ?

                In that case you have to put something like "blog/my_doc.php" in the Aliases TV.
                  • 3749
                  • 24,544 Posts
                  Quote from: dev_cw at Jan 22, 2009, 05:43 PM

                  The website is set to use .html and that is set in the site configuration. But we need the virtual alias with the suffix .php for a few pages that get external references. If I change the suffix to .php then all the .html pages will break.

                  Maybe i am not understanding Virtual Aliases correctly, I thought that I could use it to redirect URLs from an old site to the new document on the new site. Maybe it is just to have multiple aliases with the exact same suffix.

                  Since Missing works i will see if I can adapt it to use a TV for the alias rather than a hard coded array.

                  Thanks for your help, much appreciated. grin

                  Adding an Apache handler in .htaccess to serve html files as PHP might remove the need for virtual aliases. It may slow things down slightly but I’ve never seen a noticeable difference.


                  addhandler x-httpd-php .html


                  Some people suggest the following instead, although I think it is no longer recommended:

                  AddType application/x-httpd-php .html 

                    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
                    • 7231
                    • 4,205 Posts
                    Not using alias path.

                    That is a good idea BobRay. However my client is an SEO and she requires a 301 redirect for these pages.

                    I used the Missing plug-in and it is actually more efficient since there is no database query because the redirect data is in an array. We only have to redirect @ 20 pages so this will work OK. I will try again with Virtual Aliases when I get some time or need multiple aliases.

                    Thanks for the help. grin
                      [font=Verdana]Shane Sponagle | [wiki] Snippet Call Anatomy | MODx Developer Blog | [nettuts] Working With a Content Management Framework: MODx

                      Something is happening here, but you don't know what it is.
                      Do you, Mr. Jones? - [bob dylan]