我怎样才能改变URL在Word preSS单页?URL、Word、preSS

2023-09-02 09:51:45 作者:从前不快乐

我用一句话preSS作为CMS。我已经开发了一个自定义插件,显示经销商的信息。

I'm using wordpress as the CMS. I have developed a custom plugin to show dealers information.

下面是URL。

http://example.nl/dealer -info /经销商-与资源/ N = 91&安培; D =经销商名称

91 是被用来获取数据库中的数据的经销商ID。

91 is the dealers ID which is used to fetch the data from the DB.

是否有可能为我改变,以如下的URL。

Is it possible for me to change to URL as below.

http://example.nl/dealer-info/dealer-与资源/ 91 /经销商名称

http://example.nl/dealer-info /经销商 - 与资源/?N = 91 /经销商名称

我的目的是我想补充 /经销商名称的URL。

My purpose is to just to add /dealer-name to the URL.

我如何更改URL在Word preSS单页?

How can I change the URL for a single page in Wordpress?

由于我不想改变,这将影响整个网站的永久链接。我知道的事实,这可以通过使用的.htaccess做,但我不知道该怎么办了。帮我如果可能的话。

Given that I don't want to change the permalinks which will affect the whole site. I'm aware the fact that this can be done using .htaccess but I don't the how to do it. Help me out if possible.

推荐答案

尝试:

RewriteEngine On
RewriteRule ^dealer-info/dealer-informatie/([0-9]+)/(.*)$ /dealer-info/dealer-informatie/?n=$1&d=$2 [L]

您会希望添加的在的任何字preSS specificf规则放到文档根目录。

You'll want to add that before any wordpress specificf rules in your document root.