homepage Welcome to WebmasterWorld Guest from 54.196.136.119
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

    
#$#@$#@!$ mod_rewrite
Grumble...Grumble
micahb37




msg:1503103
 2:21 pm on Jun 25, 2003 (gmt 0)

For the life of me, I cant get my head around mod_rewrite. Here is what I have:
Options All
Options +FollowSymLinks
RewriteEngine on
RewriteBase /
RewriteRule blah /dir/page.jsp [R=301,L]
All I want to do, is if someone clicks on a link that is www.mydomain.com/blah.htm its redirected to www.mydomain.com/dir/page.jsp. Where .jsp dynamically generates a page.

It seems to work, but it returns:

HTTP/1.1 302 Found
Date: Wed, 25 Jun 2003 01:05:21 GMT
Server: Apache/1.3.26 (Unix) mod_perl/1.26 PHP/4.2.3
Location: [mydomain.com...]
Connection: close
Transfer-Encoding: chunked
Content-Type: text/html; charset=iso-8859-1

Which I would prefer to be a 301 for the GoogleBot, correct?

micah

 

DaveAtIFG




msg:1503104
 2:40 pm on Jun 25, 2003 (gmt 0)

Try redirecting to a static page and see if the headers show a 301. If so, you should be swearing at Java (although mod_rewrite often deserves it too!) and figuring out how to return a 301 from the dynamic page.

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