A custom URL can be created for any of the "Website pages" in Making Music Platform. This can be done either from within the page itself or from the Custom URLs page.
Creating a Custom URL from within a page
This is done by "editing" the page. To check if a page can be edited, log in as a webmaster and scroll to the bottom of the page; if there is an edit button in the bottom-right corner of the page, then this page can be edited, and you can create a custom URL for the page, as follows...
- Click on the edit button in the bottom-right corner of the page.
- On the Page Details page, on the General tab, scroll down to the Page Meta-data section. There you will see the Custom URL field shown below...
- Enter the Custom URL for the page. In the example shown above, we are creating a Custom URL for the Latest News page. We could enter something like news in the Custom URL field, or even the latest news. Note: Spaces are not allowed in any URL, so if you enter the latest news in the Custom URL field, the spaces will be replaced by hyphens, so your custom URL will become https://www.yourgroup.com/latest-news.
- Click Save at the bottom of the page.
Creating a Custom URL from the Custom URLs page
The Custom URLs page allows us to create custom URLs for any of your "Website pages". To access this page, proceed as follows:
- Log in as a webmaster
- Click on the Admin link in the top-right corner of the page to access the Admin Dashboard.
- Scroll down to the Website Content section, and click on the Custom URLs link to the right of this in the Admin Pages column. This displays the Custom URLs page, the top section of which is shown here...
The Custom URL page is divided into 4 main sections:
- Website Pages, shown above, which allows us to create custom URLs for the pages in the "Website pages" database.
- Custom URLs from other tables, which allows us to create custom URLs for Events and Productions pages.
- Ensure .htaccess is up to date (detailed below).
- Add a new Custom URL to .htaccess, which allows us to create a custom URL for any other page, for example, a song's page or a poll's page.
Each section of the Custom URL page is described in more detail here:
Website Pages
The Website Pages section of the page, shown below, lists all the pages from the pages database...
For each page, the Page name is shown, along with its Regular URL and its Custom URL, if one currently exists. There is the opportunity to create or update a Custom URL by clicking on the "Update page" icon in the far-right column, circled above.
Pages visible to the public are shown in bold. It is generally only meaningful to create custom URLs for public-facing pages.
To create a custom URL for a public-facing page, proceed as follows:
- Click on the "Update page" icon to the far right of the page you wish to create a custom URL for. From this point on, it's identical to the instructions above, when editing the page directly.
- On the Page Details page, on the General tab, scroll down to the Page Meta-data section. There you will see the Custom URL field shown below...
- Enter the Custom URL for the page.
- Click Save at the bottom of the page.
Custom URLs from other tables
The Custom URLs from other tables section of the page is shown below. This allows for the creation of custom URLs for either Events or Productions.
Note that only events/productions that already have custom URLs are listed, not the entire database of events/productions.
Simply locate the Event or Production for which you would like to create a custom URL, and click on the "Update Event" or Update Production" icon to the right of this (circled above).
To create a custom URL for any event...
- Click the [administer] link to the right of either Events or Productions, to take you to the corresponding administration page
- Locate the event/production that you wish to create a custom URL for, and click the "update" icon to the right of it
- Click the Public tab
- Scroll down to the Custom URL heading. Enter the name of your custom URL in the box next to this:
- Click Save at the bottom of the page.
Ensure .htaccess is up to date
Most websites (and all Making Music Platform) have a file on the server called .htaccess - a configuration file which contains, amongst other things, the complete list of custom URLs configured into your site. This file is modified directly and automatically whenever you assign a custom URL to a page, event or production. The file looks something like this...
When you create a custom URL, a new entry beginning with RewriteRule is added to the .htaccess file. Or at least, it's supposed to. Occasionally the file may not get updated correctly (rare). If for any reason, this hasn't happened correctly, you'll notice this because one or more of your custom URLs won't be working.
It's possible to "fix" the .htaccess file so that it correctly lists all the custom URLs, and so that all the custom URLs actually work. To do so, simply click on the Update file with all custom URLs button at the foot of this section.
Add a new Custom URL to .htaccess
As mentioned above, it is possible to assign a custom URL to any page in your system, not just "Website pages", events and productions. For example, you could create a custom URL for a song's page or a poll's page.
For example, if you have a song that has a URL of http://www.mygroup.com/dbpage.php?pg=view&dbase=rep&id=83, and you wanted it to have a URL of http://www.mygroup.com/auld-lang-syne, you would do the following...
- In the Existing regular URL field, enter just the portion of the existing URL after the last "/" (i.e.dbpage.php?pg=view&dbase=rep&id=83)
- In the New custom URL field, enter your own new custom URL for the page, in this case, auld-lang-syne.
- Click on the Add button. This will create the new custom URL, by adding a new RewriteRule entry to the site's .htaccess file.