lighttpd - rewriting multiple subdirectories possible?

I'm having trouble trying to get mod_rewrite working and I'm beginning to wonder if I'm trying to do the impossible.

I've got rewrite working fine at the root of my domain using this rule:

#

$HTTP["host"] == "www.epicgadgets.com" {

url.rewrite-once = (

"^/(..php|wp-content/|wp-admin/|wp-includes/)." => "$0",

"^/([^,]*)/?$" => "/index.php/$1"

)

}

#

What I would like to do is evaluate several blogging/cms platforms at once, installing them in folders like:

epicgadgets.com/wordpress/

epicgadgets.com/wpmu/

epicgadgets.com/joomla/

epicgadgets.com/drupal/

and have each of those installs able to rewrite URLS back to the root of its subfolder.

If that's not doable, I could even go for something like this:

wordpress.epicgadgets.com

wpmu.epicgadgets.com

joomla.epicgadgets.com

drupal.epicgadgets.com

Is either of those things possible?

3 Replies

The second approach would be a lot easier to implement, as it would totally isolate each CMS you're trying out.

$HTTP["host"] == "wordpress.epicgadgets.com" {
    # Rewrite rules for Wordpress here
}

$HTTP["host"] == "joomla.epicgadgets.com" {
    # Rewrite rules for Joomla here
}

$HTTP["host"] == "drupal.epicgadgets.com" {
    # Rewrite rules for Drupal here
}

and so on. Repeat as necessary.

Ok, I'll give the … subdomain? option a try. I kinda like that more anyway. Thanks.

Worked like a charm! Thanks so much - doing it via subdomains was my first choice anyway.

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct