LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 12-12-2010, 01:03 PM   #1
crypted
Member
 
Registered: Jan 2004
Posts: 59

Rep: Reputation: 15
.htaccess rewrite issues


Annoyingly, rewrite rules for Mediawiki tend to override my /stats/ and other undelying directories unless the link is a direct page such as /stats/index.html instead of just /stats/.

Any idea on overriding that?

Current .htaccess:
Code:
Options +FollowSymlinks
RewriteEngine On
RewriteBase /

RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ /index.php?title=$1 [L,QSA]
 
Old 12-12-2010, 02:02 PM   #2
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,217
Blog Entries: 1

Rep: Reputation: 2070Reputation: 2070Reputation: 2070Reputation: 2070Reputation: 2070Reputation: 2070Reputation: 2070Reputation: 2070Reputation: 2070Reputation: 2070Reputation: 2070
Hi,

If I can understand well, you want to keep the existing rewriting except for the /stats directory. If that's the case, you can use:

Code:
RewriteCond %{REQUEST_URI} !^/stats
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ /index.php?title=$1 [L,QSA]
Regards
 
1 members found this post helpful.
Old 12-12-2010, 04:20 PM   #3
crypted
Member
 
Registered: Jan 2004
Posts: 59

Original Poster
Rep: Reputation: 15
That did the trick! THANKS!!!!
 
  


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] Debian, Lenny, suEXEC, Apache2, .htaccess rewrite rules don't work anymore. Mogget Linux - Server 1 07-10-2010 07:33 PM
.htaccess rewrite problem skylimit123 Linux - Server 6 04-02-2010 12:42 PM
htaccess 301 rewrite BillKat Linux - Server 2 04-07-2009 01:54 PM
htaccess issues qwerty_tele Linux - Newbie 3 05-09-2008 12:57 AM
Apache2 mod vhost_alias - problems with .htaccess mod rewrite d_t_baker Linux - Server 1 08-16-2007 08:32 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 12:43 AM.

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
Open Source Consulting | Domain Registration