plugin development – .htaccess with WordPress – create my own pretty url with parameters (above WordPress settings)

Question

(first of all, sorry for my poor english)

I have an url what is works just fine: example.com/myevent/?e=event_unique_title , I like to change the way to see it in the address bar to: example.com/myevent/event_unique_title

Is there a way to add this rule to the .htaccess file to see always the “pretty” url and get the parametered version as a result?

I tried a few versions like this, but got no result:

RewriteEngine On

RewriteRule ^myevent/([\w-]+)$ /myevent/?e=$1 [QSA,L]

And of course I do not like to break the WordPress own settings.

Thanks for any help!

0
Kálmán 4 months 2022-04-17T12:14:48-05:00 0 Answers 0 views 0

Leave an answer

Browse
Browse