I need help with htaccess and a sub domain.

I have a site I developed with ci 2.1.3

My folders structure is:

In the public_html folder I have the htaccess file:

RewriteEngine On
RewriteCond $1 !^(index\.php|assets|images|robots\.txt|captcha)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L] 

Now I uploaded my site to the live server to a sub directory called: dev
I created a subdomain: dev.mysite.co.za

I uploaded all the files to the dev directory.

When I go to: dev.mysite.co.za

I get the page Index of with a list of the directories that are in the dev directory.

What do I need to do in order to see the site on the sub domain?

Can someone please help?

Recommended Answers

All 3 Replies


I moved the dev folder to the root folder so now I actually have a sub domain...

But now When I go to: dev.mysite.co.za I get this default web page with instructions:

If you are the web site owner, it is possible you have reached this page because:

The IP address has changed.
There has been a server misconfiguration.
The site may have been moved to a different server.

I wrote my host, and will post here if I find the answer.

Ok, sorry, as you can see I try lots of things....

The folder is now in the public_html folder.

Now if I go to:
dev.mysite.co.za I get 404 Page not found

if I go to mysite.co.za/dev I get the Index of page.

What I really want is to get my index.php page that sits in: public_html/dev/public_html.... lol cry lol

so, the folder of the subdomain (dev) is inside the DocumentRoot of the main domain? Can you show the configuration?

The folder structure is something like below?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, learning, and sharing knowledge.