简体   繁体   中英

Updating permalinks in WP and .htaccess killed the non-WP subpages

Update: Woops, realized I put the code in the wrong folder. The root not the /blog/

Client is running an old version of wordpress, around 1.7 or 1.8ish.

The Blog is at:

site.com/blog/

The link format was like this:

http://www.site.com/blog/?p=1276

And I had selected to change the format to have titles based on keywords from the title:

http://www.site.com/blog/keyword1-keywords2-...-keywordX/

I then updated my .htaccess with this code generated:

#<IfModule mod_rewrite.c>
#RewriteEngine On
#RewriteBase /blog/
#RewriteCond %{REQUEST_FILENAME} !-f
#RewriteCond %{REQUEST_FILENAME} !-d
#RewriteRule . /blog/index.php [L]

The result was that the subpages on the site.com that were not in the blog folder were unreachable. (the main page was reachable, and the blog did work fine with the new URLs, it just messed up the rest of the site)

Anyone have any ideas on why this might have disrupted the rest of the site and any changes I can make to the code?

Update: Woops, realized I put the code in the wrong folder. The root not the /blog/

我遇到了类似的问题,我要做的是转到每个页面并发布(在更新了永久链接结构之后),并更新每个页面,以便创建一个新的URL。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM