LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 11-30-2012, 03:14 PM   #1
wilkos73
LQ Newbie
 
Registered: Nov 2012
Posts: 10

Rep: Reputation: Disabled
Apache Rewrite Command


I have a website that I am working on that 301 redirects were not installed the first time. The site has the following format:

http://www.OURSITE.com/current_categ...gion=aroostook

Since 99% of the old URLs contain "current_category" is there a way to write a rule to capture any url containing this and redirect it?

( This would save a lot of time if possible. If not I assume eache individual URL or the 650 of them needs to be redirected individually)

Thanks for your Help!!!
 
Old 12-01-2012, 02:06 AM   #2
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 11,821

Rep: Reputation: 1591Reputation: 1591Reputation: 1591Reputation: 1591Reputation: 1591Reputation: 1591Reputation: 1591Reputation: 1591Reputation: 1591Reputation: 1591Reputation: 1591
Hi,

You don't give much details about the final URL, but you can use either RedirectMatch for simple redirections, or mod_rewrite for complex ones. In this case you need to use something like
Code:
RewriteCond %{REQUEST_URI} ^/current_category
Regards
 
1 members found this post helpful.
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Apache rewrite help vockleya Linux - Server 1 06-17-2011 11:36 PM
Apache Rewrite mahmoud Linux - Software 2 11-11-2008 07:52 AM
Apache Rewrite mahmoud Linux - Newbie 2 10-08-2008 08:11 AM
apache rewrite help deesto Linux - Server 3 11-03-2006 02:07 PM
Need help with Apache rewrite kinetik Linux - General 6 05-19-2006 06:02 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 09:30 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration