The Cache: Technology Expert's Forum
 
*
Welcome, Guest. Please login or register. November 19, 2008, 05:04:30 PM

Login with username, password and session length


Pages: [1]
  Print  
Author Topic: Mod Rewrite for directories below document root  (Read 190 times)
deregular
Journeyman
***
Offline Offline

Posts: 67


View Profile
« on: July 27, 2008, 06:30:15 AM »

Wasnt sure where to post this as I suppose you could call it a "Nix" or a "php" topic.

I have .htaccess looking like this...
Code:
RewriteEngine On
RewriteBase /
RewriteRule ^([a-z]+)/([a-z]+)/?$ /SCRIPTS/cleanurls/index.php?q=$1&r=$2

.. and it all works fine.

However, for the sake of easy deployment, I would like to not have to alter the .htaccess
file for every install i do of this custom CMS.

Is there something I can use in the place of the "/SCRIPTS/cleanurls/" part of the rule,
I presume I cannot call a php function through modrewrite like dirname($_SERVER['REQUEST_URI']) Huh?

any ideas?
« Last Edit: July 27, 2008, 06:32:00 AM by deregular » Logged
Bompa
Administrator
Expert
*****
Offline Offline

Posts: 207


View Profile WWW
« Reply #1 on: July 27, 2008, 06:57:54 PM »

I don't know.  Cheesy

What I do know is that the dirs below doc root will need to be for the same domain.

htaccess in doc root does not work on dirs that are delegated to other domains, (DNS),
unless you have wildcard DNS setup.  You said every install which makes me think of
separate domains.




« Last Edit: July 27, 2008, 06:59:59 PM by Bompa » Logged

deregular
Journeyman
***
Offline Offline

Posts: 67


View Profile
« Reply #2 on: July 27, 2008, 09:06:25 PM »

Actually you know what, having read your post mate, I think I may know what is going on.

Will post back later on when i get home and have a chance to look at it.

cheers
d
Logged
Pages: [1]
  Print  
 
Jump to:  

Perkiset's Place Home   Best of The Cache   phpMyIDE: MySQL Stored Procedures, Functions & Triggers
Politics @ Perkiset's   Pinkhat's Perspective   
cache
mart
coder
programmers
ajax
php
javascript
Powered by MySQL Powered by PHP Powered by SMF 1.1.2 | SMF © 2006-2007, Simple Machines LLC
Seo4Smf v0.2 © Webmaster's Talks


Valid XHTML 1.0! Valid CSS!