Hello All:

I´ve recently switched my site from normal html to Joomla1.5, and I need to do some 301 Redirects. I´m not sure if what I want to do is possible, but I figured I would ask.

Goal 1. I want to redirect ALL .htm files to www.mydomain.com EXCEPT for those contained in a subfolder, www.mydomain.com/archives/
Goal 2. However, I want to exclude a couple of specific .htm files, which would be redirected to specific pages and not to www.mydomain.com. Right now I have 301 redirects written for these, but I didn´t know if goal #1 would take precidence over these or not.

Option #2: Another option, if anyone knows how to do it, would be to redirect all files in mydomain.com that start with a certain letter to one file ... for example, all files in www.mydomain.com that start with E would be redirected to www.mydomain.com/newpageE.html

Any help you could give me would be greatly appreciated!
Thank you!

You can do redirection of your web pages from within the control of your web hosting account. I know cPanel has such function.

But if you don't want to go that route, this is a simple PHP code for URL redirection:

<?php
   ob_start();
   echo "Redirecting......";
   echo '<meta http-equiv="refresh" content="0;url=http://www.mydomain.com/" />';
   ob_flush();
?>

Copy and paste this code on every web page you'd like redirected to www.mydomain.com

For the other part, you have to change "url=http://www.mydomain.com/" to "url=www.mydomain.com/newpageE.html"

I hope this will help a bit.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.