Page 42 - Payout Magazine Online Volume 8.0
P. 42

easons exist why you decide to mask dynamic script as static —those
       Rreasons often deal with SEO and others deal with usability. Whatever the case,
       masquerading scripts is a straightforward process that doesn’t take long at all,
       given you don’t do it individually for hundreds of scripts. Doing so means you’ve
       likely structured your site improperly.

        This  article  walks  you  through  masquerading  cgi/php  scripts,  but  remains
       applicable to varying types of scripts run server-side through apache.

       requirements
        To set  up  your  cgi  and  php  scripts for  a  static  guise,  you  need
       certain tools — as well as access to specific parts of your server
       and administration rights.

       access and administration
        Access to .htaccess Overrides – If you don’t run your
       own server, contact your host. Inquire whether the server
       configuration allows .htaccess overrides.

        Access to the Server Modules – If you’re using
       an Apache server, you’ll need to make sure
       to install your mod_rewrite module.


       Tools
        ASCII Text Editor  – To change the
       commands in your code properly, you’ll
       need to use an ascii text editor.  You
       cannot use something like WordPad,
       Microsoft Word, Textmaker, or any other
       word processor. They add additional lines
       behind the visible code. As a result, this will cause
       errors. The following lists free, safe editors:

        „   Notepad++  – Notepad++ boasts a twice-
           awarded recipient of the SourceForge Community   Masquerading
           Choice Award for Best Developer Tool. Download it at
           https://notepad-plus-plus.org/.

        „   Vim – Vim boasts the vote for most popular by Linux Journal
           Readers in 2006 and the third most popular editor in 2015 and             CGI/PHP
           2016, according to Stack Overflow surveys. Download it at http://
           www.vim.org/.
                                                                                             Scripts
        „   Atom  –  Though  just  two  years  in,  Atom  has  made  LifeHacker’s  top  five
           lists. Download it at https://atom.io/.
        „   Emacs – A family of editors, Emacs started out in the mid seventies. Download
           it at http://www.gnu.org/software/emacs/.
        „   UltraEdit  – UltraEdit stays on its game with upwards of thirty awards,
           including People’s Choice Award and IDM’s Best Application. Download it at
           http://www.ultraedit.com/.

       Masking and Parsing: Single versus all
        There are two ways in which to render a URL. The first involves masking single
       dynamic pages so they appear static. In this method, you point to a particular page
       and have the CGI render the dynamic URL to appear static. For example, “yoursite.



       42 PAYOUTMAGAZINE                                                                Sponsored by
       42
   37   38   39   40   41   42   43   44   45   46   47