hi there
i have a website develop in codeigniter framework i have upload the website in subdomain but the the problem with url rewrite. the website home page works fine oes.techpawer.com but when i open the login page or any other page it will not work like to open login page http://oes.techpawer.com/site/login this will not work but when i add index.php then it works fine http://oes.techpawer.com/index.php/site/login but locally my site is workin without index.php means localhost/online_exam/site/login.

what's the problem with the subdomain why this is not working

here is the htaccess file code that i have.

<IfModule mod_rewrite.c>
    Options +FollowSymLinks
    RewriteEngine On
    RewriteBase /oes/

    # Removes access to the system folder by users
    RewriteCond %{REQUEST_URI} ^system.*
    RewriteRule ^(.*)$ /index.php/$1 [L]

    # Checks to see if the user is attempting to access a valid file
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.*)$ index.php/$1 [L]

    # Add a extension to URL
    # RewriteCond %{REQUEST_FILENAME} !-f
    # RewriteCond %{REQUEST_FILENAME} !-d
    # RewriteRule ^(.*)$ $1.php [L,QSA]
    # http://domain/about -> http://domain/about.php

    # Force "www." in the domain name.
    # RewriteCond %{HTTP_HOST} !^www.mydomain.com$
    # RewriteRule ^(.*)$ http://www.mydomain.com/$1 [R=301]

</IfModule>

waiting for quick reply

Regards
Rizwan

Recommended Answers

All 3 Replies

Member Avatar for LastMitch

what's the problem with the subdomain why this is not working

I have a Codeigniter on my sub-domain and it works fine. I mean the Codeigniter folder I have on my host server is working and my admin is working fine too.

So the question is what are you doing? I'm not sure why you changing your htaccess file when you don't necessary need to do that in the first place.

waiting for quick reply

The htaccess file should be on the domain root not in the Codeigniter folder. Do you understand what I am talking about.

Member Avatar for LastMitch

actually when any page open the url would be but if i add the index.php before site/developers than it works perfectly fine but i don't want index.php.

Regardless you still need a index.php file in that developer folder. I don't understand why you don't want it how can you access the admin section?

Be a part of the DaniWeb community

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