$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'); ?>plugins - URL Rewrite 404|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)

plugins - URL Rewrite 404

matteradmin11PV0评论

I've got the following ReWrite rule:

add_rewrite_rule("details\/([a-zA-Z0-9_]+)\/.*", "detail/?id=$matches[1]", "top");

Which seems to be adding in the following to my .htaccess, which now looks like this in its entirety:

# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteRule ^details\/([a-zA-Z0-9_]+)\/.* /detail/?id= [QSA,L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress

This doesn't seem to work. I'm a bit unsure as to why it hasn't put $1 on the end of the rewrite rule. Anyway, I manually added that, and it seems to then be doing something. I can see that the title of the page has changed to that of the rewritten page. The page itself however is still returning a 404 and the standard "OOPS! THAT PAGE CAN’T BE FOUND." message appears.

What have I done wrong?

Articles related to this article

Post a comment

comment list (0)

  1. No comments so far