LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices



Reply
 
Search this Thread
Old 04-07-2008, 11:44 AM   #1
sea-bass
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

Code:
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


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

As always appreciate your help...

Sea-Bass
 
  


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


All times are GMT -5. The time now is 05:40 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration