Tintin81
Tintin81

Reputation: 10207

How to redirect old blog article URLs using mod_rewrite?

I am new to mod_rewrite and I need to redirect a bunch of blog article URLs from

http://www.mywebsite.com/index.php/global/article/stackoverflow-rules

to

http://www.mywebsite.com/blog/article/stackoverflow-rules

How can this be done using mod_rewrite and regular expressions?

Thanks for any help.

Upvotes: 1

Views: 33

Answers (1)

Amit Verma
Amit Verma

Reputation: 41209

Try the following redirect in htaccess:

RedirectMatch ^/index\.php/global/article/(.+)$ http://www.mywebsite.com/blog/article/$1

Upvotes: 1

Related Questions