Fix images url and add redirects for wiki
Images location from a url perspective is /w/images, not /images. Also, add redirect from /article to /wiki/article. Change-Id: I63f29a5c3e66e3a3e9c0dc53ac8deb9550390912 Reviewed-on: https://review.openstack.org/20167 Reviewed-by: Jeremy Stanley <fungi@yuggoth.org> Approved: Clark Boylan <clark.boylan@gmail.com> Reviewed-by: Clark Boylan <clark.boylan@gmail.com> Tested-by: Jenkins
This commit is contained in:
parent
d74e96877c
commit
f5defa100e
@ -58,7 +58,7 @@
|
||||
Order allow,deny
|
||||
allow from all
|
||||
</Directory>
|
||||
<Directory "<%= scope.lookupvar('mediawiki::mediawiki_location') %>/images">
|
||||
<Directory "<%= scope.lookupvar('mediawiki::mediawiki_images_location') %>">
|
||||
# Ignore .htaccess files
|
||||
AllowOverride None
|
||||
|
||||
@ -96,7 +96,13 @@
|
||||
|
||||
Alias /w <%= scope.lookupvar('mediawiki::mediawiki_location') %>
|
||||
Alias /wiki <%= scope.lookupvar('mediawiki::mediawiki_location') %>/index.php
|
||||
Alias /images <%= scope.lookupvar('mediawiki::mediawiki_images_location') %>
|
||||
Alias /w/images <%= scope.lookupvar('mediawiki::mediawiki_images_location') %>
|
||||
|
||||
# Redirect old /Article_Name urls
|
||||
RewriteEngine on
|
||||
RewriteCond %{REQUEST_URI} !^/w/
|
||||
RewriteCond %{REQUEST_URI} !^/wiki/
|
||||
RewriteRule ^/(.*)$ https://<%= scope.lookupvar("mediawiki::site_hostname") %>/wiki/$1 [L,R]
|
||||
|
||||
ErrorLog /var/log/apache2/error.log
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user