This question about Configuration: Answered

bin/view still appear in web browser address bar

I wish to remove /bin/view from web browser address bar, so that links will be shorter.

In my Apache configuration file, I have following lines to rewrite:

Alias /foswiki/bin "/var/www/foswiki/bin"

Alias /foswiki/pub "/var/www/foswiki/pub"
Alias /foswiki/robots.txt "/var/www/foswiki/robots.txt"

RewriteEngine    on

Alias /foswiki "/var/www/foswiki/bin/view"
RewriteRule ^/+foswiki/+bin/+view/+(.*) /foswiki/$1 [L,NE,R]
RewriteRule ^/+foswiki/+bin/+view$ /foswiki/ [L,NE,R]

What works:
  • when I type "shortened" URL, topic is opened properly and in web browser URL I see shortened URL

What does not:
  • when I click on any link to other topic, 'bin/view' is added
  • when I open foswiki main page /bin/view is added

What should I modify? Is that I use mod_perl important in this case?

-- MateuszKDzior - 11 Aug 2015

In bin/configure, the setting for {ScriptUrlPaths}{view} should be set to your desired view URL. so in your case, it should be ={ScriptUrlPaths}{view} = '/foswiki'; mod_perl won't make any difference, other than needing to reload Apache after making a configuration change.

-- GeorgeClark - 11 Aug 2015

Thank you! It works great!

-- MateuszKDzior - 12 Aug 2015

 

QuestionForm edit

Subject Configuration
Extension
Version Foswiki 2.0.0
Status Answered
Related Topics
Topic revision: r5 - 22 Sep 2017, MichaelDaum
The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. See Copyright Statement. Creative Commons License    Legal Imprint    Privacy Policy