Forum Moderators: phranque

Message Too Old, No Replies

Moved phpBB forum, redirect not working, pls HELP!

         

seminole

11:48 pm on Apr 27, 2006 (gmt 0)

10+ Year Member



I moved all content and DB is moved and working in 2 places, moving to a different domain name and in the process I want to enforce the use of WWW. However, all my attempts at redirect are not working? I've been trying it all day. I've also tried different methods on different boards that I operate and am finding that this is maybe a phpBB problem. tried redirect 301, a redirect cgi with rewrite, and a mod rewrite. There must be something specific about the way phpBB works that is thwarting my attempts. I'm on Linux, Apache.

GOAL:

FROM: [vette-nation.com...]

TO: [corvette-nation.com...]

Topics 1 thru 375 are moved to the other domain. It's all live but no matter what I do I cannot get a redirect to work.

I have forums 1 thru 7, same type of URL, viewforum.php?f=1 that also need to be redirected to the new domain.

seminole

12:06 am on Apr 28, 2006 (gmt 0)

10+ Year Member



OMG, I just busted it open, for anyone else that goes through this. The trick is simple, or maybe the mistake was more simple...

I was including the forum number and topic number in my redirect.

All I had to do was drop that "?t=100" for topic # 100, a simple "veiewtopic.php" did the trick, and the variable was passed without having that in the redirect.

So, I did not need to redirect all posts, only the .php files, viewtopic.php, viewforum.php, index.php, etc. the rest of URL will pass without being included in the URL

Jesus, what a long day.

jdMorgan

5:14 pm on Apr 28, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



The query string is not part of the URL -- It is data attached to the URL to be passed to the resource *at* that URL. Knowing this fact makes things a bit easier to understand.

Query strings in rewriterules can be passed through unchanged, replaced, or cleared, or the rule can append new paramters to the existing query. The default is to pass the query through unchanged. If a question mark is present in the substitution URL, then this will not happen. Instead, the behaviour will depend on what else is in the rule:

Pass through : RewriteRule ^foo\.php$ /bar.php [L]
Clear query. : RewriteRule ^foo\.php$ /bar.php? [L]
Replace query: RewriteRule ^foo\.php$ /bar.php?req_uri=foo [L]
Append query : RewriteRule ^foo\.php$ /bar.php?req_uri=foo [QSA,L]

Jim