1

I picked up a new-to-me client who had a site built in ASP.net (which I do not host).

I converted the site to PHP, which worked fine.

I want to set up redirects for all the pages he had in the old site (it was a small site, so there was only 8 pages).

As an example, the ASP.net url for the Contact page was www.domain.com/Contact - it is now www.domain.com/Contact.php (and so on).

For 301 redirects from one PHP page to another I normally use the .htaccess file:

Options +FollowSymlinks
RewriteEngine on
#custom redirects
rewriterule OldPage.php http://www.domain.com/NewPage.php [R=301,L]
#end custom redirects

What can I do to redirect these ASP.net pages to the new PHP pages?

They are all static pages with no dynamic content.

Mike Ray
  • 13
  • 2

1 Answers1

1

Not exactly what you asked for, but if you turn Multiviews on then Apache will look for Contact.* and find your .php file.

Neil
  • 54,642
  • 8
  • 60
  • 72
  • Would this be through cpanel? – Mike Ray Jan 29 '11 at 17:44
  • MultiViews can be set with an Options directive within a , or section in httpd.conf, or (if AllowOverride is properly set) in .htaccess files. – Neil Jan 29 '11 at 17:46
  • Awesome! A little Google goes a long way when you know what to look for. I just added: Options +Indexes +FollowSymlinks +MultiViews to the .htaccess and that seems to have done it! – Mike Ray Jan 29 '11 at 17:54