$conf, $runtime; function_exists('chdir') AND chdir(APP_PATH); $r = 'mysql' == $conf['cache']['type'] ? website_set('runtime', $runtime) : cache_set('runtime', $runtime); } function runtime_truncate() { global $conf; 'mysql' == $conf['cache']['type'] ? website_set('runtime', '') : cache_delete('runtime'); } register_shutdown_function('runtime_save'); ?>permalinks - Redirect From Url To Url|Programmer puzzle solving
最新消息:Welcome to the puzzle paradise for programmers! Here, a well-designed puzzle awaits you. From code logic puzzles to algorithmic challenges, each level is closely centered on the programmer's expertise and skills. Whether you're a novice programmer or an experienced tech guru, you'll find your own challenges on this site. In the process of solving puzzles, you can not only exercise your thinking skills, but also deepen your understanding and application of programming knowledge. Come to start this puzzle journey full of wisdom and challenges, with many programmers to compete with each other and show your programming wisdom! Translated with DeepL.com (free version)

permalinks - Redirect From Url To Url

matteradmin8PV0评论

I want to redirect the same directory, but different url structure. The url structure I use: http:example/car/cadillac/image/2

I want to direct http: example/car/cadillac/image/ url. Because this url is 404. I want to redirect to http: example/car/cadillac/

(In fact, the problem comes from the "image" link structure: How to change the permalink structure of a master page?) As an alternative, I thought about the routing rule. But the cpanel 301 redirect is not successful.

http: example/car/cadillac/image/ How can we redirect the URL to http: example/car/cadillac/ ?

I want to redirect the same directory, but different url structure. The url structure I use: http:example/car/cadillac/image/2

I want to direct http: example/car/cadillac/image/ url. Because this url is 404. I want to redirect to http: example/car/cadillac/

(In fact, the problem comes from the "image" link structure: How to change the permalink structure of a master page?) As an alternative, I thought about the routing rule. But the cpanel 301 redirect is not successful.

http: example/car/cadillac/image/ How can we redirect the URL to http: example/car/cadillac/ ?

Share Improve this question asked Dec 15, 2018 at 23:08 A. MullerA. Muller 439 bronze badges
Add a comment  | 

1 Answer 1

Reset to default 1

The easiest way to do is by using Redirection plugin. Follow these steps:

  1. Install and activate the plugin.
  2. Head to Tools > Redirection.
  3. Enter your Source URL (example/car/cadillac/image/) and Target URL (http: example/car/cadillac/).
  4. Finally, click on "Add Redirection" button.

Articles related to this article

Post a comment

comment list (0)

  1. No comments so far