Guest MrLeN Posted October 7, 2018 Share Posted October 7, 2018 I want to change my WordPress URL's (permalinks) to not having the date in them.I know how to do this, as there is a simple setting for that in Settings > PermalinksHowever, if you change them, the old ones don't work.Is there a way to change them and also redirect the old ones? Quote Link to comment https://forums.phpfreaks.com/topic/307764-wordpress-question/ Share on other sites More sharing options...
Guest MrLeN Posted October 7, 2018 Share Posted October 7, 2018 I mean easily, not by separately having to find all the links and create a redirect file or something. That would kill me. Quote Link to comment https://forums.phpfreaks.com/topic/307764-wordpress-question/#findComment-1561408 Share on other sites More sharing options...
requinix Posted October 7, 2018 Share Posted October 7, 2018 If you're talking about hardcoded URLs somewhere, you'll have to fix them yourself. If you're talking about existing URLs that you want to support then you should be able to use URL rewriting for it. An example of the old and new URLs would make explaining that process easier. Quote Link to comment https://forums.phpfreaks.com/topic/307764-wordpress-question/#findComment-1561409 Share on other sites More sharing options...
Guest MrLeN Posted October 7, 2018 Share Posted October 7, 2018 (edited) Yes, I am not worries about hardcoded URL's -- they're posted all over the Internet for years. I wish WordPress had a build in functionality so that if you change the permalink structure, it will automatically redirect all the old ones. In my brain, I am almost positive it used to be like that. Apparently not. Ok., so what you're saying is I have to create a .htaccess file with some kind of rewrite code that will handle all the links? Edited October 7, 2018 by MrLeN Quote Link to comment https://forums.phpfreaks.com/topic/307764-wordpress-question/#findComment-1561410 Share on other sites More sharing options...
requinix Posted October 7, 2018 Share Posted October 7, 2018 Since WP isn't doing it automatically... yeah. Should only take a couple minutes since you should already have that .htaccess in place - you know, for WP to work at all. Quote Link to comment https://forums.phpfreaks.com/topic/307764-wordpress-question/#findComment-1561411 Share on other sites More sharing options...
Guest MrLeN Posted October 7, 2018 Share Posted October 7, 2018 I don't suppose you know how I would write that file? Or where I can go to find out? Because I don't know how to write such a line. Quote Link to comment https://forums.phpfreaks.com/topic/307764-wordpress-question/#findComment-1561412 Share on other sites More sharing options...
requinix Posted October 7, 2018 Share Posted October 7, 2018 There was that thing I asked about in my first reply. That would be nice. Quote Link to comment https://forums.phpfreaks.com/topic/307764-wordpress-question/#findComment-1561413 Share on other sites More sharing options...
Guest MrLeN Posted October 7, 2018 Share Posted October 7, 2018 Quote Yes, I am not worries about hardcoded URL's -- they're posted all over the Internet for years. I am not referring to hardcoded URL's. I am referring only to WordPress permalinks in the settings page. ie: I want to change the structure of: REMOVED LINK TO SLOW AS HELL WEBSITE OF A MORON to REMOVED LINK TO SLOW AS HELL WEBSITE OF A MORON Quote Link to comment https://forums.phpfreaks.com/topic/307764-wordpress-question/#findComment-1561414 Share on other sites More sharing options...
Guest MrLeN Posted October 7, 2018 Share Posted October 7, 2018 It's not 100% important, but I just don't like the dates. They suck. Quote Link to comment https://forums.phpfreaks.com/topic/307764-wordpress-question/#findComment-1561415 Share on other sites More sharing options...
requinix Posted October 7, 2018 Share Posted October 7, 2018 You've seen RewriteRules before, right? Give it a quick shot and post what you come up with. Quote Link to comment https://forums.phpfreaks.com/topic/307764-wordpress-question/#findComment-1561416 Share on other sites More sharing options...
Guest MrLeN Posted October 7, 2018 Share Posted October 7, 2018 I already tried to use a URL rewriting tool, but it says that the URL structure is not dynamic. Quote Link to comment https://forums.phpfreaks.com/topic/307764-wordpress-question/#findComment-1561417 Share on other sites More sharing options...
requinix Posted October 7, 2018 Share Posted October 7, 2018 Obviously it's wrong. Have you considered not using some automated tool? You don't have to know mod_rewrite inside and out to write something, even if it's not really working. Quote Link to comment https://forums.phpfreaks.com/topic/307764-wordpress-question/#findComment-1561420 Share on other sites More sharing options...
Guest MrLeN Posted October 7, 2018 Share Posted October 7, 2018 I think this thread can be closed. The question is relating to whether or not WordPress has the functionality to redirect changed permalinks. It appears it either doesn't or nobody around here knows the answer. So I'll keep searching. Thanks for your time. Quote Link to comment https://forums.phpfreaks.com/topic/307764-wordpress-question/#findComment-1561427 Share on other sites More sharing options...
Guest MrLeN Posted October 7, 2018 Share Posted October 7, 2018 Oh, actually it seems there is such a plugin..https://wordpress.org/plugins/simple-301-redirects/ Quote Link to comment https://forums.phpfreaks.com/topic/307764-wordpress-question/#findComment-1561428 Share on other sites More sharing options...
requinix Posted October 7, 2018 Share Posted October 7, 2018 If you read closer you'll see that plugin doesn't do what you want: to redirect changed permalinks. It's just a generic redirection plugin. That does the exact same thing that rewriting rules in your .htaccess would do, but with worse performance. But hey, at least you didn't have to learn anything new, huh? 1 Quote Link to comment https://forums.phpfreaks.com/topic/307764-wordpress-question/#findComment-1561429 Share on other sites More sharing options...
Guest MrLeN Posted October 7, 2018 Share Posted October 7, 2018 Get stuffed. Smart ass. Quote Link to comment https://forums.phpfreaks.com/topic/307764-wordpress-question/#findComment-1561433 Share on other sites More sharing options...
Guest MrLeN Posted October 7, 2018 Share Posted October 7, 2018 (edited) Please delete my account from this useless place. All you did for a whole page is act coy about answering but not really answering -- pretending you're trying to help, but not really. And then when I diverted back to what the original thread was about (because I could see the pointlessness in what you were doing), you had to get the last word in (sarcastically). I am currently adding the redirects 1 by 1 using the plugin above. I researched htaccess and regular expressions. I don't get them (not in the time I have to "learn" anyway). I don't expect you to do it for me, if you don't want to -- but I at least expect you not to be a smart ass about it. And quite frankly, if you were standing in front of me with that shitty, patronizing attitude, I'd slap you like a bitch. I'm not joking. So, again, get stuffed. Thanks for nothing you patronizing smart ass. Edited October 7, 2018 by MrLeN Quote Link to comment https://forums.phpfreaks.com/topic/307764-wordpress-question/#findComment-1561434 Share on other sites More sharing options...
requinix Posted October 8, 2018 Share Posted October 8, 2018 My car was broken into today so I'm totally in the mood to honor your quest, MrLeN. Enjoy the rest of the internet. Quote Link to comment https://forums.phpfreaks.com/topic/307764-wordpress-question/#findComment-1561439 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.