500 Internal Service Error in codeigniter on sub domain

I had an admin panel written in codeigniter on my website root folder say Then I needed to move it to a sub directory named admin so i can upload my main website on the root folder. the admin panel was now on Then i created a subdomain for my website named and pointed it to my sub directory named admin. But when i tried to visit it gives a 500 internal server error. I thought it was due to .htaccess but my .htaccess file has this code:

<IfModule authz_core_module>
    Require all denied
<IfModule !authz_core_module>
    Deny from all

Now i don’t know whats causing the problem ? The original working was that when someone visited the he was redirected to and same happens when someone visits the he is redirected to I even tried to change the base path in codeigniter config.php to $config['base_url'] = ''; but it is not working. So please let me know if someone can help. The only solution i found was that move the whole admin panel back to root folder but it is now good as i have to host a static website there. I am waiting for your answers.

Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

Sorry to see that your question hasn’t received an answer yet. Unfortunately, after this much time, it is unlikely that an answer for this specific question will be provided. For people still landing here via search, a good first step when receiving a 500 Internal Server error is to check Apache’s error logs for more information. This command will print the last (most recent) 50 lines of the log file:

sudo tail -n 50 /var/log/apache2/error.log