Welcome to the most active Linux Forum on the web.
Go Back > Forums > Linux Forums > Linux - Server
User Name
Linux - Server This forum is for the discussion of Linux Software used in a server related context.


  Search this Thread
Old 04-07-2008, 10:44 AM   #1
LQ Newbie
Registered: Dec 2006
Posts: 14

Rep: Reputation: 0
RewriteCond & Rewrite Rule Problemo

Hi Folks,

Ok I know what I want but how to write it I am falling into the land of numptiness...

I have 3 redirects

RewriteRule     ^/$                     /about/                                 [L,R,NC,QSA]
RewriteRule     ^/index.html$           /about/                                 [L,R,NC,QSA]
RewriteRule     ^/index.htm$            /about/                                 [L,R,NC,QSA]
But what I need is to redirect all in ^/$ to /about/ except sitemap.xml

I have discovered rewritecond and am trying to get this to work, but no luck so far

#RewriteCond %{REQUEST_URI} !(sitemap.xml)
#RewriteRule ^about([^.]+)\.html$$1.html?Lang=en [R=301,L]
# Else redirect all others
#RewriteCond %{REQUEST_URI} !\.(html|htm|)$
#RewriteRule (.*)$1 [R=301,L]
This might be overkill but its the best lead I have so far..

As always appreciate your help...



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
rewrite rule base url apache2 sinister1 Linux - Software 3 11-23-2007 10:17 AM
Apache rewrite rule help kinetik Linux - Software 1 11-05-2007 11:18 AM
i need a rewrite rule!help arcow Linux - Enterprise 1 07-03-2007 05:37 AM
Exception in mod-rewrite rule Boby Programming 0 01-17-2006 07:40 PM
Help me make this rewrite rule in Apache ganninu Linux - General 8 01-07-2004 08:30 AM > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 07:45 PM.

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