-
-
Notifications
You must be signed in to change notification settings - Fork 10
Shortening URL
Uros Preloznik edited this page Jan 18, 2018
·
6 revisions
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.
#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]