{"id":8749,"date":"2017-02-03T09:40:28","date_gmt":"2017-02-03T14:40:28","guid":{"rendered":"https:\/\/pitss.org\/us\/?p=8749"},"modified":"2017-09-05T15:24:42","modified_gmt":"2017-09-05T19:24:42","slug":"redirect-urls-ohs","status":"publish","type":"post","link":"https:\/\/pitss.org\/us\/2017\/02\/03\/redirect-urls-ohs\/","title":{"rendered":"How to Redirect URLs in OHS"},"content":{"rendered":"<p>[et_pb_section fb_built=&#8221;1&#8243; custom_padding=&#8221;0px||50px|&#8221; admin_label=&#8221;section&#8221; _builder_version=&#8221;3.0.51&#8243;][et_pb_row custom_padding=&#8221;0px|||&#8221; _builder_version=&#8221;3.0.51&#8243; background_size=&#8221;initial&#8221; background_position=&#8221;top_left&#8221; background_repeat=&#8221;repeat&#8221;][et_pb_column type=&#8221;4_4&#8243; _builder_version=&#8221;3.0.47&#8243; parallax=&#8221;off&#8221; parallax_method=&#8221;on&#8221;][et_pb_text _builder_version=&#8221;3.0.64&#8243; custom_margin=&#8221;||30px|&#8221;]<\/p>\n<h1 style=\"margin-bottom: 15px;\">How to Redirect URLs in OHS<\/h1>\n<p>Oracle HTTP Server (OHS) can be used to redirect users to a new site when a particular URL is specified. This is useful if you would like to have users go to a new domain or website if they still would like to access an old URL. A RewriteRule can be written in httpd.conf (for HTTP) and\/or ssl.conf (for HTTPS) to perform this. This can be implemented in both 11g and 12c. The following steps are written for 12c, but they can also be used for 11g to redirect traffic from the starting OHS page (http:\/\/server.domain:&lt;ohs_port&gt;) to another page.<\/p>\n<p>[\/et_pb_text][et_pb_divider color=&#8221;#e2e2e2&#8243; show_divider=&#8221;on&#8221; divider_position=&#8221;center&#8221; _builder_version=&#8221;3.0.51&#8243; custom_css_main_element=&#8221;margin-bottom:30px !important;&#8221;][\/et_pb_divider][et_pb_text _builder_version=&#8221;3.0.51&#8243; custom_margin=&#8221;||30px|&#8221;]<\/p>\n<h3><strong>What you&#8217;ll learn in this article:<\/strong><\/h3>\n<p><strong style=\"font-size: 16px; padding-right: 5px; background-color: #ffffff; color: #abd25e;\">\u2713<\/strong> Step-by-step instructions on how to redirect URLS in Oracle HTTP Server<\/p>\n<p>[\/et_pb_text][\/et_pb_column][\/et_pb_row][et_pb_row custom_padding=&#8221;40px|40px|30px|40px&#8221; background_color=&#8221;#006bb3&#8243; background_position_1=&#8221;top_left&#8221; background_repeat_1=&#8221;no-repeat&#8221; _builder_version=&#8221;3.0.51&#8243;][et_pb_column type=&#8221;4_4&#8243; _builder_version=&#8221;3.0.47&#8243; parallax=&#8221;off&#8221; parallax_method=&#8221;on&#8221; background_position=&#8221;top_left&#8221; background_repeat=&#8221;no-repeat&#8221;][et_pb_text background_layout=&#8221;dark&#8221; _builder_version=&#8221;3.0.64&#8243; background_color=&#8221;#006bb3&#8243;]<\/p>\n<h2><strong>Fill out this form to get immediate access to the article.<br \/>\n<\/strong><\/h2>\n<p>[\/et_pb_text][et_pb_code module_class=&#8221;white-text&#8221; _builder_version=&#8221;3.0.67&#8243;][ninja_form id=22][\/et_pb_code][\/et_pb_column][\/et_pb_row][\/et_pb_section]<\/p>\n","protected":false},"excerpt":{"rendered":"<p>How to Redirect URLs in OHS Oracle HTTP Server (OHS) can be used to redirect users to a new site when a particular URL is specified. This is useful if you would like to have users go to a new domain or website if they still would like to access an old URL. A RewriteRule [&hellip;]<\/p>\n","protected":false},"author":5,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_et_pb_use_builder":"on","_et_pb_old_content":"Oracle HTTP Server (OHS) can be used to redirect users to a new site when a particular URL is specified. This is useful if you would like to have users go to a new domain or website if they still would like to access an old URL. A RewriteRule can be written in httpd.conf (for HTTP) and\/or ssl.conf (for HTTPS) to perform this. This can be implemented in both 11g and 12c. The following steps are written for 12c, but they can also be used for 11g to redirect traffic from the starting OHS page (http:\/\/server.domain:<ohs_port>) to another page:\r\n<ol>\r\n \t<li>Log into EM Fusion Middleware Control.<\/li>\r\n \t<li>Go to the Target Navigation (you may have to click the button in 12c to access the menu), expand HTTP Server, right-click on ohs1, go to Administration --> Advanced Configuration.\r\n<ul>\r\n \t<li><a href=\"https:\/\/pitss.org\/us\/wp-content\/uploads\/sites\/4\/2017\/02\/Target-Navigation.png\"><img class=\"alignnone size-full wp-image-8750\" src=\"https:\/\/pitss.org\/us\/wp-content\/uploads\/sites\/4\/2017\/02\/Target-Navigation.png\" alt=\"Target Navigation\" width=\"500\" height=\"428\" \/><\/a><\/li>\r\n<\/ul>\r\n<\/li>\r\n \t<li>If you are using 12c, click the lock button in the top-right corner, and select \"Lock & Edit\". If you are using 11g, you may skip to step 4.\r\n<ul>\r\n \t<li><a href=\"https:\/\/pitss.org\/us\/wp-content\/uploads\/sites\/4\/2017\/02\/Lock-and-Edit.png\"><img class=\"alignnone size-full wp-image-8751\" src=\"https:\/\/pitss.org\/us\/wp-content\/uploads\/sites\/4\/2017\/02\/Lock-and-Edit.png\" alt=\"Lock and Edit\" width=\"321\" height=\"293\" \/><\/a><\/li>\r\n<\/ul>\r\n<\/li>\r\n \t<li>Select \"httpd.conf\" in the drop-down menu and click \"Go\".<\/li>\r\n \t<li>Scroll to the very bottom of the file. Add the following three lines:\r\n<ul>\r\n \t<li>RewriteEngine On\r\nRewriteCond %{REQUEST_URI} ^\/$\r\nRewriteRule ^(.*)$ http:\/\/<server>.<domain>:<OHS_PORT>\/newhtml.html [R,L]<\/li>\r\n \t<li>NOTE: You may also redirect to a new domain such as <newserver>.<newdomain> using the same rewrite rule parameter.<\/li>\r\n \t<li><a href=\"https:\/\/pitss.org\/us\/wp-content\/uploads\/sites\/4\/2017\/02\/RewriteEngine.png\"><img class=\"alignnone size-full wp-image-8752\" src=\"https:\/\/pitss.org\/us\/wp-content\/uploads\/sites\/4\/2017\/02\/RewriteEngine.png\" alt=\"RewriteEngine\" width=\"922\" height=\"572\" \/><\/a><\/li>\r\n<\/ul>\r\n<\/li>\r\n \t<li>Click \"Apply\" to save all changes.<\/li>\r\n \t<li>If you would like to also perform a redirect when using HTTPS, you may apply the same changes for ssl.conf. If you do not need to do this, please skip to step 9. However, when adding these three lines in ssl.conf, it should be before the closing <\/ifModule> tag and the rewrite rule should use HTTPS. You may use the screenshot below as an example.\r\n<ul>\r\n \t<li><a href=\"https:\/\/pitss.org\/us\/wp-content\/uploads\/sites\/4\/2017\/02\/RewriteEngine-SSL.png\"><img class=\"alignnone size-full wp-image-8753\" src=\"https:\/\/pitss.org\/us\/wp-content\/uploads\/sites\/4\/2017\/02\/RewriteEngine-SSL.png\" alt=\"RewriteEngine SSL\" width=\"913\" height=\"548\" \/><\/a><\/li>\r\n<\/ul>\r\n<\/li>\r\n \t<li>Click \"Apply\" to save all changes.<\/li>\r\n \t<li>(Skip to Step 10 if you are using 11g). In the top-right corner, click the lock button and select \"Activate Changes\".<\/li>\r\n \t<li>Restart OHS.<\/li>\r\n<\/ol>\r\nAfter applying the steps above, when the index.html page is accessed of your OHS server using http(s):\/\/<server>.<domain>:<OHS_PORT>, the URL will be immediately redirected to the page you specified in the RewriteRule.","_et_gb_content_width":"","footnotes":""},"categories":[4,93,19,10],"tags":[11,16,89,41,25,46],"class_list":["post-8749","post","type-post","status-publish","format-standard","hentry","category-install-config","category-ohs","category-unix-linux","category-windows","tag-11g","tag-11gr2","tag-12c","tag-configuration","tag-customer-support-request","tag-ohs"],"_links":{"self":[{"href":"https:\/\/pitss.org\/us\/wp-json\/wp\/v2\/posts\/8749","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/pitss.org\/us\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/pitss.org\/us\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/pitss.org\/us\/wp-json\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/pitss.org\/us\/wp-json\/wp\/v2\/comments?post=8749"}],"version-history":[{"count":4,"href":"https:\/\/pitss.org\/us\/wp-json\/wp\/v2\/posts\/8749\/revisions"}],"predecessor-version":[{"id":9982,"href":"https:\/\/pitss.org\/us\/wp-json\/wp\/v2\/posts\/8749\/revisions\/9982"}],"wp:attachment":[{"href":"https:\/\/pitss.org\/us\/wp-json\/wp\/v2\/media?parent=8749"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/pitss.org\/us\/wp-json\/wp\/v2\/categories?post=8749"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/pitss.org\/us\/wp-json\/wp\/v2\/tags?post=8749"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}