permalinks

Wordpress missing blog permalink

為{幸葍}努か 提交于 2019-12-02 03:55:29
I set up my Wordpress website, imported all blog post and submitted my sitemap to Google last month. I realized that my blog posts appear like: www.domain.com/blog-post-name <- without the /blog/ directory. I can add the blog directory by changing the Wordpress permalinks, but then when someone goes to the old blog URL, they get a 404 error. Is it possible to direct users who go to www.domain.com/blog-post-name to www.domain.com/blog/blog-post-name Thanks This should work for you (changing the www.domain.com to your domain) : Options -Indexes +SymLinksIfOwnerMatch RewriteEngine on RewriteBase

How can I place a meta value in rewrite rule for custom post type?

时光毁灭记忆、已成空白 提交于 2019-12-01 19:46:31
问题 I've completely re-written this question as it got a bit long, and I was worried people skipped it without reading it completely. I have a custom post type (procedure) that features a custom meta key/value with a page ID that I want to use as the slug. I'm using this function (below) to create the permalinks in the admin area, but when viewing these, the pages are 404 errors. How can I create rewrite rules to use this same format? function bv_procedure_parent_slug( $url, $post ) { if( get

How can I place a meta value in rewrite rule for custom post type?

白昼怎懂夜的黑 提交于 2019-12-01 18:53:59
I've completely re-written this question as it got a bit long, and I was worried people skipped it without reading it completely. I have a custom post type (procedure) that features a custom meta key/value with a page ID that I want to use as the slug. I'm using this function (below) to create the permalinks in the admin area, but when viewing these, the pages are 404 errors. How can I create rewrite rules to use this same format? function bv_procedure_parent_slug($url, $post) { if(get_post_type($post) == 'procedure' && get_post_meta($post->ID, 'procedure_parent', true)) { $procedure_parent =

How to use PathPattern in order to create DeepLink Apps Android?

北战南征 提交于 2019-12-01 18:52:43
I have read documentation about create an deeplink and use app linking service in android studio 3.0. its pretty simple and easy to understand, but I have little bit problem when my URL has no prefix path. example : https://example.com/ /amp there is no prefix, its directly url pattern. when i use regex ^[a-z0-9]+(?:-[a-z0-9]+)*$ it doesnt works, error shown as The URL doesnt map to any activity when i use only star, like : https://example.com/ */amp its show seem error. i got stuck in this step, I've check much tutorial about deeplink, and there always use pathPrefix instead of pathPattern.

Wordpress permalink structure change issue

隐身守侯 提交于 2019-12-01 16:00:46
问题 I have seen some other posts on SO about this issue, however none of the suggested solutions did work for me, so I repost. After changing my permalink structure to /%postname%/ , none of the links is working. I get the following 404: Not Found The requested URL /my-post-name/ was not found on this server. Apache/2.2.20 (Ubuntu) Server at mysite.com Port 80 When I get back to the default permalink structure it starts to work again, but I want to have /%postname%/ structure anyways. My

Custom Posts with same slug Redirecting to wrong post with same slug

我与影子孤独终老i 提交于 2019-12-01 15:07:04
问题 I have 2 Custom Post type posts.The video Post and City-guide Post The first Post(Video Post) contains the url: 104.130.239.132/rick-owens/ and the second Post(City-Guide Post) conatins url:http://104.130.239.132/city-guide/rick-owens/ (city-guide is the permalink structured which is the name of custom post type). SO the issue arrise here whenever we try to access the first url it displays the template and content of 2nd url.The 2nd url is latest published.I tried from myself to solve by

Rails Routing Question: Mapping Slugs/Permalinks Directly under Root?

情到浓时终转凉″ 提交于 2019-12-01 12:38:48
Morning Everyone!.. General Routing Quesiton Here... I'm currently working to achieve a route similar to this for users in my application. http://www.example.com/ username This then maps to the usersControllers#show, hence I have the following in my routes file. map.connect '/:permalink', :controllers => "users", :action => "show" I've then got the show action to find the user by the permalink in the param. So its works but.... The problem I'm running into is that all other UNDEFINED routes get sent to userController#show. i.e 404's & other un-named routes. So I dont think i'm going with the

Generation of _id vs. ObjectId autogeneration in MongoDB

假如想象 提交于 2019-12-01 11:13:18
I'm developing an application that create permalinks. I'm not sure how save the documents in MondoDB. Two strategies: ObjectId autogeneration MongoDB autogenerates the _id . I need to create an index on the permalink field because I get the information by the permalink. Also I can access to the creation time of the ObjectId, using the getTimestamp() method, so datetime fields seems to be redundant but if I delete this field I need two calls to MongoDB one to take the information and another to take the timestamp. { "_id": ObjectId("5210a64f846cb004b5000001"), "permalink": "ca8W7mc0ZUx43bxTuSGN

MySQL query - indentiyfing data using URL names where data is organised into a hierachy

馋奶兔 提交于 2019-12-01 10:32:49
问题 I have a mysql table called content which stores content data for a content management system. NOTE: all content is organised into a hierachy using a parent id column. +----+------------+-----------------+--------+ | id | slug | content_type_id | parent | +----+------------+-----------------+--------+ | 1 | portfolio | 5 | 0 | | 2 | about-us | 1 | 0 | | 3 | find-us | 1 | 0 | | 4 | contact-us | 1 | 2 | | 5 | find-us | 1 | 4 | +----+------------+-----------------+--------+ I need a query to

Rails Routing Question: Mapping Slugs/Permalinks Directly under Root?

六月ゝ 毕业季﹏ 提交于 2019-12-01 10:08:32
问题 Morning Everyone!.. General Routing Quesiton Here... I'm currently working to achieve a route similar to this for users in my application. http://www.example.com/ username This then maps to the usersControllers#show, hence I have the following in my routes file. map.connect '/:permalink', :controllers => "users", :action => "show" I've then got the show action to find the user by the permalink in the param. So its works but.... The problem I'm running into is that all other UNDEFINED routes