Forum Moderators: phranque

Message Too Old, No Replies

Redirection problem

Rewriteengine or redirect permanent?

         

Klians

2:30 pm on Jul 10, 2006 (gmt 0)

10+ Year Member



I need that when one visitor access to:
[mywebpage.com...] (or another dynamic URL) it redirects to (and appears in browser) this URL: [mywebpage.com...]

Any help would be appreciated :)

jdMorgan

5:36 pm on Jul 10, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



In .htaccess:

RewriteRule ^forum[b]1[/b]/viewtopic.php$ http://www.example.com/forum[b]2[/b]/viewtopic.php [R=301,L]

The existing query string will be passed through unchanged.

I assume you already have other working rewriterules. If not, preface the above with:


Options +FollowSymLinks
RewriteEngine on

For more information, see the documents cited in our forum charter [webmasterworld.com] and the tutorials in the Apache forum section of the WebmasterWorld library [webmasterworld.com].

Jim

Klians

6:37 pm on Jul 10, 2006 (gmt 0)

10+ Year Member



Will this work?:
RewriteRule ^forum1/(.*)$ http://www.example.com/forum2/$1 [R=301,L]

jdMorgan

3:18 pm on Jul 11, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Only one way to find out: test it and see...

Jim