Welcome to WebmasterWorld Guest from 3.84.130.252

Forum Moderators: Ocean10000 & phranque

Message Too Old, No Replies

Mod Rewrite

How to capture requests for all asp pages and rewrite them to html

     
11:43 pm on Aug 26, 2003 (gmt 0)

New User

10+ Year Member

joined:Aug 26, 2003
posts:2
votes: 0


I redid a site from asp to html, and I am trying to figure out the best way to have all the spidered asp pages redirect to the new html pages ( or even just the index page )

Sould I use a mod rewrite and if so how do I do it, I tried a bunch of things but got server error 500

RewriteEngine on
RewriteBase /
RewriteRule [^.]*\.asp$ ^(.*)$ [site.com...] [NC,R]

Or would it be better to redo all the asp pages with a hyperlink to the index page that just say document has moved, so mayne some PR can be passed on?

Thanks in advance for your help.
Stephan

12:22 am on Aug 27, 2003 (gmt 0)

Senior Member

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

joined:Mar 31, 2002
posts:25430
votes: 0


stephan99,

Welcome to WebmasterWorld [webmasterworld.com]!

Rewrite <anything>.asp to <anything>.html
For use in top-level .htaccess:


RewriteEngine on
RewriteBase /
RewriteRule ^(.+)\.asp$ http://www.site.com/$1.html [R=301,L]

Ref: Introduction to mod_rewrite [webmasterworld.com]

Jim

12:43 am on Aug 27, 2003 (gmt 0)

New User

10+ Year Member

joined:Aug 26, 2003
posts:2
votes: 0

Thank you very much :[smilestopper]o)

Stephan

 

Join The Conversation

Moderators and Top Contributors

Hot Threads This Week

Featured Threads

Free SEO Tools

Hire Expert Members