简体   繁体   中英

URL rewriting with WordPress

I have WordPress running on Apache, I have some URL like this one:

https://www.mywebsite.com/fr/?type=Manager

And I want it to be :

https://www.mywebsite.com/fr/manager/

I tried different things such as:

RewriteRule ^?type=Manager$ manager/ 

but it's not working. With this one for example I'm getting a 500 error, and sometimes it just does nothing. I don't know if it's my htaccess config, or because it's WordPress or because I'm stupid.

Use this rule in your .htaccess instead:

RewriteRule ^fr/([^/]*)$ /fr/?type=$1 [L]

Make sure you clear your cache before testing this.

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