Support the ongoing development of Laravel.io →
Configuration

Hi,

I have recently deployed a site to a new shared server. The way the site is setup is that the index.php file is inside a subfolder (/mysite.com/index.php). I had to make a change to the .htaccess file to redirect visitors from the root folder to the main site. So now when I type my url in I get to the right homepage, but whenevr I click a link I just get "no input file specified". How do I fix this? My current htacess file looks like this

# .htaccess main domain to subdirectory redirect
# Do not change this line.
RewriteEngine on
RewriteCond %{HTTP_HOST} ^mysite.co.uk$ [NC,OR]
RewriteCond %{HTTP_HOST} ^www.mysite.co.uk$
RewriteCond %{REQUEST_URI} !mysite.co.uk/
RewriteRule (.*) /fitnessquiz.co.uk/$1 [L]

AddHandler application/x-httpd-php53 .php .php5 .php4 .php3

Last updated 3 years ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

jackyoung1 jackyoung1 Joined 13 Aug 2015

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2025 Laravel.io - All rights reserved.