Rewrite folder name in URL internally using htaccess

I had images stored with a folder, which was named descriptively. Unfortunately this meant that the resulting URL was larger than it had to be. Rather than rename the directoy, and make all existing image calls invalid, I wanted to allow the folder to be called by an alias in the URL. If the URL contains /a/example.jpg, it will rewrite to the actual directory name on my server, eg /a-very-long-directory-name/example.jpg. I entered this in my htaccess file.

RewriteEngine on
RewriteRule ^a/(.*) a-very-long-directory-name/$1

APEX URL parameters

The APEX URL is constructed as follows

The numbers are to be replaced with the following

1 – The number or alias of the application you wish to run. To access the current application id, use &APP_ID. (remember to include the final dot)

2 – The page number or page alias. The page alias can be set in the page attributes.

3 – The session. to access the current session, use &SESSION. (remember to include the final dot)

4 – The request that you want to pass to the destination page.

5 – DEBUG. Decide whether the page is run in debug mode or not. either YES or NO.

6 – This parameter can accept two values. RP = resets the pagination of the destination page followed by a comma separated list of pages where you wish to reset the cache. So for example if you want to reset pagination and reset the cache for pages 1 and 2 you would include “RP,1,2” for this parameter.

7 – Comma separated list of page items to assign values to.

8 – Comma separated list of values to assign to the page items specified at position 7. The values must be in the same order as the page items are.

9 – Printerfriendly. Determines if the page is being rendered in printer friendly mode. YES or blank.