-
Notifications
You must be signed in to change notification settings - Fork 10
Shortening URL
With this guide you will remove /gisportal/index.php from URL.
Add this to VirtualHost tag for site hosting gisportal (above existing RewriteRules). Adjust your paths if necessary.
If you followed gisapp setup you have this configuration prepared in /etc/apache2/conf-enabled/gisapp.conf. Just edit that file and uncomment some lines to have configuration below:
#Enable this when shortening gisportal URL
DocumentRoot /var/www/html/gisportal/
#Enable this when shortening gisportal URL and you already used gisportal so you need redirection
#redirect old gisportal links to root
Redirect /gisportal/ /
#allow htaccess
<Directory /var/www/>
Options Indexes FollowSymLinks
AllowOverride All
Require all granted
</Directory>
Alias /gisapp/ /var/www/html/gisapp/
Edit .htaccess in /gisportal/ folder and remove comment to get this:
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L]
If after complete setup you get errors on start screen use this instead of last line
RewriteRule ^(.*)$ index.php?/$1 [L]
Edit /gisportal/application/config/config.php:
$config['base_url'] = 'http://your_server/'; //just remove gisportal/ part
$config['index_page'] = ''; //remove index.php
Edit settings at the bottom of gisapp/client_common/settings.js like this:
Eqwc.settings.gisPortalRoot = '/';
Eqwc.settings.mailServiceUrl = Eqwc.settings.gisPortalRoot + 'mail/send';
Eqwc.settings.gisPortalProfile = Eqwc.settings.gisPortalRoot + 'profile';
Restart Apache and open web browser to try this (better to close and reopen browser if you have link previously opened). If you have problems look first at point nr. 2. above!