Redirect the web browser to use a specified workspace

From pmusers
Jump to: navigation, search

By default, if the user enters a URL like:
     http://domain

Then, ProcessMaker will redirect to the URL:
     http://domain/sys/lang/skin/login/login

If only using one workspace, and wanting users to always use that workspace, then the workspace can specified, so that the user doesn't have to manual enter the name of the workspace in the login screen.

For example, if using the default "workflow" workspace, the default language of English, and the default skin "neoclassic", then edit the file workflow/public_html/index.html and change the line:

    <meta http-equiv="REFRESH" content="0;URL=sys/en/neoclassic/login/login" />

To:

    <meta http-equiv="REFRESH" content="0;URL=sysworkflow/en/neoclassic/login/login" />


The web browser can also be redirected from http://domain/sys/lang/skin/login/login to http://domain/sysworkspace/lang/skin/login/login


Edit the pmos.conf file and inside the virtualhost definition, add the following line:

      Redirect /sys/lang/skin/login/login http://domain/sysworkspace/lang/skin/login/login


For example:

<VirtualHost localhost>
    ServerName "localhost"

    DocumentRoot /opt/pm3.3.10/workflow/public_html
    DirectoryIndex index.html index.php

    <Directory /opt/pm3.3.10/workflow/public_html>
        Options Indexes FollowSymLinks MultiViews
        AddDefaultCharset UTF-8
        AllowOverride None
        Require all granted
        ExpiresActive On

        #added to redirect to the "workflow" workspace:
        Redirect /sys/en/neoclassic/login/login http://localhost/sysworkflow/en/neoclassic/login/login

        <IfModule mod_rewrite.c>
            RewriteEngine On
            RewriteCond %{REQUEST_FILENAME} !-f
            RewriteRule ^.*/(.*)$ app.php [QSA,L,NC]
        </IfModule>
        AddOutputFilterByType DEFLATE text/html
    </Directory>
</VirtualHost>