0

I have developed a static site that works great when on my local server: mysite.dev

However, in my staging server, I have it going into a subdirectory:
sites.domainname.com/mysite

While it works on my local server (MAMP Pro), when I FTP the files to the /mysite directory, a link that should be sites.domainname.com/mysite/about/index.php is actually sites.domainname.com/about/index.php (completely leaving out the subdirectory folder "mysite")

How can I fix this using .htaccess in the mysite folder?

aturner
  • 1
  • 3
  • When you upload the files is the .htaccess file included? – Felipe Alameda A Feb 06 '13 at 22:01
  • I have the .htaccess on the staging server only, not on my local dev server. – aturner Feb 06 '13 at 22:03
  • It will be helpful to know what's inside that .htaccess file. – Felipe Alameda A Feb 06 '13 at 22:05
  • Nothing currently is in the .htaccess. I've tried tons of things from googling, but none have worked, so it is a completely blank .htaccess file. – aturner Feb 06 '13 at 22:09
  • Maybe the uploaded files have relative links that don't match the directory structure of the web site and don't include the /`mysite` folder in the path. ¿Have you checked that? – Felipe Alameda A Feb 06 '13 at 22:18
  • That is what I am trying to achieve in the .htaccess. It works fine on my dev server, so the relative links work fine there. It is just not working properly on dev because of the subfolder. – aturner Feb 06 '13 at 22:39
  • In this case maybe the best approach is to use a mod_alias directive in the .htaccess file in **root directory** For example: `Redirect 301 / http://sites.domainname.com/mysite/` I am not sure about the syntax but that's the idea. – Felipe Alameda A Feb 06 '13 at 23:06

0 Answers0