diff --git a/app/models/project_wiki.rb b/app/models/project_wiki.rb
index 163302a18f7f3f9d47cf8a312673bb2278bc264b..08a527824751382707679baaa8bb83937f84d17d 100644
--- a/app/models/project_wiki.rb
+++ b/app/models/project_wiki.rb
@@ -64,7 +64,8 @@ class ProjectWiki
   #
   # Returns an initialized WikiPage instance or nil
   def find_page(title, version = nil)
-    if page = wiki.page(title, version)
+    page_title, page_dir = page_title_and_dir(title)
+    if page = wiki.page(page_title, version, page_dir)
       WikiPage.new(self, page, true)
     else
       nil
@@ -90,6 +91,12 @@ class ProjectWiki
     wiki.delete_page(page, commit_details(:deleted, message, page.title))
   end
 
+  def page_title_and_dir(title)
+    title_array =  title.split("/")
+    title = title_array.pop
+    [title.gsub(/\.[^.]*$/, ""), title_array.join("/")]
+  end
+
   private
 
   def create_repo!
diff --git a/app/models/wiki_page.rb b/app/models/wiki_page.rb
index 76f311ed0b4bb258450caa6b3824f2033c305e64..c95b82734abff528d4c97474ff5d1469d5622541 100644
--- a/app/models/wiki_page.rb
+++ b/app/models/wiki_page.rb
@@ -175,8 +175,17 @@ class WikiPage
   end
 
   def save(method, *args)
+
     if valid? && wiki.send(method, *args)
-      @page = wiki.wiki.paged(title)
+
+      page_details = if method == :update_page
+                       @page.path
+                     else
+                       title
+                     end
+
+      page_title, page_dir = wiki.page_title_and_dir(page_details)
+      @page = wiki.wiki.paged(page_title, page_dir)
 
       set_attributes
 
diff --git a/app/views/projects/wikis/_new.html.haml b/app/views/projects/wikis/_new.html.haml
index 8cb7fa8aa0b196ff1c39ac928dfc7a483024498b..1ce292a02dfbd0f611cd1c3bf8bc491b05998cc7 100644
--- a/app/views/projects/wikis/_new.html.haml
+++ b/app/views/projects/wikis/_new.html.haml
@@ -9,6 +9,6 @@
           %span Page slug
         = text_field_tag :new_wiki_path, nil, placeholder: 'how-to-setup', class: 'form-control', required: true, :'data-wikis-path' => project_wikis_path(@project)
         %p.hint
-          Please don't use spaces and slashes
+          Please don't use spaces.
       .modal-footer
         = link_to 'Build', '#', class: 'build-new-wiki btn btn-create'
diff --git a/config/routes.rb b/config/routes.rb
index f23542cc8931aa5bab6780f75bd4afe6f856b9be..3e32068d8f75c69fdc416b96c4afd54a6ef9f5fb 100644
--- a/config/routes.rb
+++ b/config/routes.rb
@@ -204,7 +204,7 @@ Gitlab::Application.routes.draw do
           end
         end
 
-      resources :wikis, only: [:show, :edit, :destroy, :create], constraints: {id: /[a-zA-Z.0-9_\-]+/} do
+      resources :wikis, only: [:show, :edit, :destroy, :create], constraints: {id: /[a-zA-Z.0-9_\-\/]+/} do
         collection do
           get :pages
           put ':id' => 'wikis#update'