app/controllers/caboose/pages_controller.rb in caboose-cms-0.5.179 vs app/controllers/caboose/pages_controller.rb in caboose-cms-0.5.180
- old
+ new
@@ -24,19 +24,19 @@
else
render :file => 'caboose/application/under_construction', :layout => false
end
return
# See if we're on a forwarding domain
- #elsif !d.primary && d.forward_to_primary
- # pd = d.site.primary_domain
- # if pd
- # url = "#{request.protocol}#{pd.domain}"
- # if request.fullpath && request.fullpath.strip.length > 0 && request.fullpath.strip != '/'
- # url << request.fullpath
- # end
- # redirect_to url
- # return
- # end
+ elsif d.primary == false && d.forward_to_primary == true
+ pd = d.site.primary_domain
+ if pd
+ url = "#{request.protocol}#{pd.domain}"
+ if request.fullpath && request.fullpath.strip.length > 0 && request.fullpath.strip != '/'
+ url << request.fullpath
+ end
+ redirect_to url
+ return
+ end
end
if !page
asset
return