John
John

Reputation: 1

Wordpress mod_rewrite within a plugin?

I tried several mod_rewrite but I asking your help, because this is a complicated matter.

Wordpress has its own permalink structure that uses mod rewrite to make the url’s search engine friendly.

I have 2 plugins. 1. Turns a page into a subdirectory. So domain.com/page/ turns into page.domain.com 2. The second one is a forum that creates pages such as /?mingleforumaction=viewforum&f=2.0 and ?mingleforumaction=viewtopic&t=23.0

How can I turn the current

http://page.domain.com/?mingleforumaction=viewtopic&t=23.0

to

http://page.domain.com/title-of-the-forum-topic/

Upvotes: 0

Views: 882

Answers (3)

Spencer Hakim
Spencer Hakim

Reputation: 1553

You can't do it based solely on the topic title, those aren't unique. You could, however, do http://page.domain.com/23.0/title-of-the-forum-topic/ where 23.0 is obviously the value that t would be set to in the query string.

Edit

RewriteEngine on
RewriteRule ^/topic/([0-9\.]+)/ /?mingleforumaction=viewtopic&t=$1

Upvotes: 1

john
john

Reputation: 1

openid does not let me login from home because of a different IP, but I am the same person as the topic starter:

@spartan018 How can that be done?

@FractalizeR The developer http://cartpauj.com/projects/mingle-forum-plugin/ used an older forum plugin and does not have the knowledge (or perhaps time to learn) to rewrite the plugin for it to have mode_rewrite rules shipped with in of have the plugin work with the permalink structure of wordpress. So I was hoping to help him, but got stuck myself because normal .htaccess mod_rewrite do not seem to work and it is based on an already existing wordpress mod_rewrite. That is why I asked for help :)

Upvotes: 0

Vladislav Rastrusny
Vladislav Rastrusny

Reputation: 29993

Why not to ask plugin author? Are you sure your plugins will handle such structure? If yes, then why there is no mod_rewrite rules shipped with them?

Upvotes: 1

Related Questions