0

I can’t seem to make this work - and I’m pretty sure that the real problem is that I just starring myself blind on it, so I hope a pair of fresh eyes can help me out.

What I wan’t to do is have several applications attached to my system. At this time, a website already exists in the root folder, but I wan’t some microsites/powerformats in a CI installation.

My mod_rewrite looks like this:

RewriteCond %{REQUEST_URI} ^/(powerformat1|powerformat2)/?$ RewriteRule ^(.*)$ powerformats/index.php/$1 [L] 

Although, getting the CI index.php correctly, when trying to access example.org/powerformat1 or example.org/powerformat2 gives me CI’s 404 page.

It seems like whatever I try of rewrite rules I either get the 404 page or nothing at all.

Any insights?

-- EDIT --

What I believe is my problem is that CI actually gets the 'powerformat1' string passed as the first segment. That is what I need to avoid. But can't that be solved through mod_rewrite?

2
  • Step one: check your logs, there has to be something in it about the rewriting. Commented Mar 9, 2011 at 8:02
  • @Berry - I did that. All I get is this: 192.168.10.175 - - [09/Mar/2011:09:04:06 +0100] "GET /powerformat1 HTTP/1.1" 404 539; still I verify (by the looks of the 404 page) that I actually do get the CI code. Commented Mar 9, 2011 at 8:06

2 Answers 2

1

You could try link directly to the file with the appropriate query string instead

RewriteRule ^(.*)$ /powerformats/index.php?somequery=$1 [L]
(you may have to change the slashes, see below)

Or it may be this:

Accessing /powerformat1/ may be rewriting to
powerformats/index.php//powerformat1/

You could try
RewriteRule ^/(.*)/$ /powerformats/index.php/$1 [L]
or some other variation with slashes:
RewriteRule ^/(.*)/$ /powerformats/index.php/$1/ [L]

Sign up to request clarification or add additional context in comments.

Comments

1

Did you miss RewriteEngine On ?

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.