Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

jagankumar16's avatar

laravel 4.2 godaddy windows hosting web.config file not working

I am developing a site using laravel.So far i did my works in localhost now i moved my app to server godaddy windows hosting in that .htaccess not worked. So i created a web.config and uploaded.I m facing a following problem

My domain structure will look like this www.maindomain.com this will be a main site for our company and my laravel app is www.maindomain.com/laravel/. When i open a laravel app it shows only homepage. but when i access my app other pages (i.e www.maindomain.com/laravel/aboutus ) it redirects to my maindomain and shows pagenot found error.

here is my web.config code

<?xml version="1.0" encoding="UTF-8"?>
<configuration>
    <system.webServer>
        <rewrite>
            <rules>
                <rule name="Index">
                    <match url="^(.*)$" />
                    <conditions>
                        <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
                        <add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
                    </conditions>
                    <action type="Rewrite" url="index.php" />
                </rule>
            </rules>
        </rewrite>
    </system.webServer>
</configuration>

What is wrong with this. help me to solve this. thanks

0 likes
3 replies
JackD's avatar

try to point it to your public folder

JackD's avatar

view your php error log to check for the error

Please or to participate in this conversation.