Welcome Guest, Not a member yet? Register   Sign In
Redirect get parameters to work with CodeIgniter
#1

[eluser]AdamP[/eluser]
I hope someone here can help me out, because I have been searching for a solutions since nearly 2 hours now.

I have a myBB forum running on one of my domains. Now I want to get rid of it, but the website is ranking very nice on Google, so I don't want to lose the indexed pages and handle them with CodeIgniter instead.

My goal is to redirect (301) this URL to a URL that I can use in CodeIgniter.

Code:
www.domain.com/forum/Calendar-Default-Calendar?year=2012&month=11&day=3&action=dayview

Redirect via htaccess (301) to:
Code:
www.domain.com/forum/calendar/2012/11/3/dayview

Next, there are some URLs like this:

Code:
www.domain.com/forum/User-admin

And I want it to be redirected to:

Code:
www.domain.com/forum/members/admin

I came up with this so far, but this doesn't work at all Sad
Code:
Options +FollowSymLinks
RewriteEngine on

RewriteRule /forum/User-(.*)$ /forum/member/$1 [R=301]

RewriteCond $1 !^(index\.php|assets|sitemap\.xml|robots\.txt)
RewriteRule ^(.*)$ /index.php/$1 [L]

I could need some help in here. Thanks!
#2

[eluser]AdamP[/eluser]
I seem to have found a solution for the last problem:

Code:
RewriteEngine on
RewriteCond $1 !^(index\.php|assets|sitemap\.xml|robots\.txt)
RewriteRule ^(.*)$ /index.php/$1 [L]

RewriteRule /forum/User-(.*)$ /forum/user/$1 [R=301]

I had to write the rule below the standard rewrite rule of CodeIgniter.




Theme © iAndrew 2016 - Forum software by © MyBB