homepage Welcome to WebmasterWorld Guest from
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Home / Forums Index / Code, Content, and Presentation / Apache Web Server
Forum Library, Charter, Moderators: Ocean10000 & incrediBILL & phranque

Apache Web Server Forum

301 woes

10+ Year Member

Msg#: 3049 posted 6:52 am on Mar 9, 2005 (gmt 0)

I'm having problems with my 301 redirects for a forum I have just upgraded.

I'm using:

redirect 301 /forum/viewforum.php?f=20 [domain.com...]

I get the error message:

Not Found

The requested URL /forum/viewforum.php was not found on this server.

Any help would be greatly appreciated!



WebmasterWorld Senior Member jdmorgan us a WebmasterWorld Top Contributor of All Time 10+ Year Member

Msg#: 3049 posted 1:23 am on Mar 23, 2005 (gmt 0)

The Redirect directive doesn't work with query strings.

If you have access to mod_rewrite, you could try:

Options +FollowSymLinks
RewriteEngine on
RewriteCond %{QUERY_STRING} ^f=20
RewriteRule ^/forum/viewforum\.php$ http://www.domain.com/forum/forumdisplay.php?f=25

If putting the code in .htaccess, leave off the leading slash of the RewriteRule pattern.


Global Options:
 top home search open messages active posts  

Home / Forums Index / Code, Content, and Presentation / Apache Web Server
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved