Have you setup workspace (OR frontend) as a VirtualHost? If so, change its DocumentRoot to system/application/controllers/frontend so that’s what you get with http://workspace. Then duplicate that VH for backend but use system/application/controllers/backend as its DocumentRoot.
As Dan asked, how do you expect to differentiate the redirection to index.php from test.php? You’ve given us NOTHING! DITTO for the backend!
Okay, as I’ve repeated many times, before you start coding a mod_rewrite redirection, write a specification for yourself so you actually KNOW what gets redirected where. When the specifications “cross,” you know you’ll have a problem unless you use exclusions (generally RewriteCond statements in your mod_rewrite block).
Let’s examine your mod_rewrite code while we’re at it:
RewriteEngine On
# Okay so far
RewriteRule ^([-a-zA-Z._]+)$ system/application/controllers/$1 [L]
# WHAT? Redirect EVERY request made to SOME
# (where is your DocumentRoot?)
# DocumentRoot file to
# system/application/controllers/test.php.
# Is that what you really want to do?
Finally, you’ve been in here before - you don’t remember to look at the mod_rewrite tutorial linked in my signature? :headbang:
Hey thanks for the fast reply, I havent slept actually lol.
Yes Id like to map all these URL to the browser.
I am trying to have a private administator area and a public site.
Its to separate a login area (like a CMS type of thing)
So if one went to http://workspace/test.php
loads: system/application/controllers/test.php controller
I suppose itd be easier to just call it admin instead of backend
That actually is making sense to me the more I think about it.
Okay my thought was this:
I have folders for: /frontend/index.php
/backend/index.php
I thought there is like a way to make Apache read the URL directory
%{ONE_OF_THESE}
And then you do something like (the ${ONE_OF_THESE} would be either frontend or backend
Hey sorry I have a document root set at index.php sorry i didnt paste it
Well I couldnt figure out a tutorial anywhere on this because I thought what I was looking for is some type of %{DIRECTORY_FETCH} then place is into the rewrite rule and I couldnt think what to look at lol
Man the above is confusing to read, sorry Im not good at that… But man you guys must have this sitepoint plugged into your cell phones I posted this in the middle of the night i didnt expect a reply so fast LOL
I gotta read your site better you gotta make your signature in bold DKLyn