wildcards in .htaccess

  • charlie12345
  • Born
  • Born
  • charlie12345
  • Posts: 1

Post 3+ Months Ago

This is my first post, so please bear with me :) Maybe I've giving too much detail, but better too much than not enuf.

I've done about 15 google searches to find an answer to this question, and either haven't found the answer or didn't understand it.

I used to have a number of .php files that passed various paramters to the scripts. I have since created separate .html files for those various pages.

I would like to permanently redirect some of those pages, but don't want to make an entry for each, and was hoping there was a way to add a 'wildcard' to the end of the old URL.

For example, the 'old' URL was

and I'd like to permanently redirect all
'/build_pages.php?free=yes&type=photo&category=alpha . . .'
to a single html page. Therefore I need a 'wildcard' at the end of the 'old/bad' URL.

BUT, for all other ''old/bad' URLs, I'd like to use a custom 404 error page, which I know is done with 'ErrorDocument 404 /xxx.htm'.

So the short of it is:
1. How can I use a wildcard at the end to encompass a range of similar pages;
2. Can I also use ErrorDocument for all other pages.

Thanks for any help.

  • Uncensored-Hosting
  • Proficient
  • Proficient
  • User avatar
  • Posts: 383
  • Loc: Los Angeles

Post 3+ Months Ago

Redirect /oldurl http://newurl.html
Yes you may use the ErrorDocument entry in your .htaccess as described. Just remember to create and upload the custom error page to your public_html, www or world wide web viewable folder should it be different from the aforementioned.

Post Information

  • Total Posts in this topic: 2 posts
  • Users browsing this forum: No registered users and 7 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum

© 1998-2017. Ozzu® is a registered trademark of Unmelted, LLC.