{"id":844,"date":"2016-07-09T14:24:58","date_gmt":"2016-07-09T14:24:58","guid":{"rendered":"http:\/\/ninecrows.com\/career\/?p=844"},"modified":"2016-07-10T00:59:54","modified_gmt":"2016-07-10T00:59:54","slug":"working-with-mod-rewrite","status":"publish","type":"post","link":"https:\/\/ninecrows.com\/career\/2016\/07\/09\/working-with-mod-rewrite\/","title":{"rendered":"Working with mod-rewrite"},"content":{"rendered":"<p>Starting to look at getting my <code>http:\/\/ninecrows.com<\/code> base URL pointed at my landing page wordpress instance at <code>http:\/\/ninecrows.com\/landingpage<\/code> (artwork to support the landing page will come later).<\/p>\n<p><!--more--><\/p>\n<p>This looks useful<\/p>\n<pre>\nRewriteEngine On \nRewriteLog \/tmp\/log.txt\nRewriteLogLevel 9 \n<\/pre>\n<p>I have read that this particular redirect is a bit challenging as you need to redirect the base reference but not the pages below it. I had found a sample that claimed to show how to do this (and it was a dozen or more lines of rewrite rules) but at that time I didn&#8217;t have the ubuntu server set up to mirror my sites so I was not ready to test it.<\/p>\n<p>I see this to take down the whole site (not what I want but perhaps useful to know).<\/p>\n<pre>\n# the conditions are implicitly combined\n# with a logical AND\nRewriteCond %{REQUEST_URI} !=\/alert.php\nRewriteCond %{REQUEST_URI} !^[^.]*\/$\nRewriteRule ^(.*)$ \/alert.php [R=301,L]\n<\/pre>\n<p>saw this suggested<\/p>\n<pre>\nRewriteRule ^(?:$|index\\.php) \/landing.html [R,L]\n<\/pre>\n<p>and this using a different module (mod_alias)<\/p>\n<pre>\nRedirectMatch 301 ^\/$ \/landing.html\n<\/pre>\n<pre>\nRewriteRule ^$ \/homepage\/\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Starting to look at getting my http:\/\/ninecrows.com base URL pointed at my landing page wordpress instance at http:\/\/ninecrows.com\/landingpage (artwork to support the landing page will come later).<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","enabled":false},"version":2}},"categories":[1],"tags":[],"class_list":["post-844","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p7F2Qc-dC","jetpack-related-posts":[],"jetpack_likes_enabled":true,"_links":{"self":[{"href":"https:\/\/ninecrows.com\/career\/wp-json\/wp\/v2\/posts\/844"}],"collection":[{"href":"https:\/\/ninecrows.com\/career\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ninecrows.com\/career\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ninecrows.com\/career\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/ninecrows.com\/career\/wp-json\/wp\/v2\/comments?post=844"}],"version-history":[{"count":4,"href":"https:\/\/ninecrows.com\/career\/wp-json\/wp\/v2\/posts\/844\/revisions"}],"predecessor-version":[{"id":848,"href":"https:\/\/ninecrows.com\/career\/wp-json\/wp\/v2\/posts\/844\/revisions\/848"}],"wp:attachment":[{"href":"https:\/\/ninecrows.com\/career\/wp-json\/wp\/v2\/media?parent=844"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ninecrows.com\/career\/wp-json\/wp\/v2\/categories?post=844"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ninecrows.com\/career\/wp-json\/wp\/v2\/tags?post=844"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}