Problem moving site to subdirectory on new host

Permalink
Hi all,

I've developed a concrete5 site locally, and I've now moved it to the web host under a subdirectory until they are ready to go live. I've messed with this for a few hours as well as done a ton of searching for answers, and haven't been able to correct the pathing issues.

The index page loads successfully, but all links give me "page not found" and clicking to log in gives me "No input file specified." The contents of my .htaccess file are as follows:

# -- concrete5 urls start --
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /c5/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME}/index.html !-f
RewriteCond %{REQUEST_FILENAME}/index.php !-f
RewriteRule . index.php [L]
</IfModule>
# -- concrete5 urls end --

I've also tried adding define('SERVER_PATH_VARIABLE', 'REQUEST_URI') to the site.php - that fixes the links on the site, but trying to log in still doesn't work. If, in this mode, I remove the "index.php" from the form action (using developer toolbar in chrome) I can log in but obviously everything else that normally has index.php included in the path is broken in the same way (I get a blank header bar, etc).

I know it's probably just something simple with the rewrite rules but I've having a heck of a time figuring it out. Any help would be greatly appreciated!

xer0trigger
 
JohntheFish replied on at Permalink Reply
JohntheFish
is /c5/ the subdirectory?

When moving a site, always do it with cache off and empty and pretty urls turned off.

So, if you can get to the dashboard, turn off pretty urls now. Then remove (rename, just in case) the .htaccess. (or you can hack the entry in the database Config table using phpMyAdmin)

The site should sort itself out. You can then turn on pretty urls again.
xer0trigger replied on at Permalink Reply
xer0trigger
Thanks for the reply!

Yes, /c5/ is the subdirectory. Cache is off but I hadn't turned pretty urls off before moving it. To turn that off via db, is that just the URL_REWRITING row in the Config table?
xer0trigger replied on at Permalink Reply
xer0trigger
So I manually cleared the cache, renamed the .htaccess file, and changed the URL_REWRITING option in the Config table to 0.

Trying to log in or any links on the site return "No input file specified." - so there's something else I'm missing yet.
JohntheFish replied on at Permalink Reply
JohntheFish
That sounds like an apache message, so it isn't getting as far as c5. Just to check the obvious, if its in a subdirectory and you have not pointed the domain pointer straight at the subdirectory, the url is:
yoursite.com/c5/index.php


Once you have things running, you may find this of interest:
http://www.concrete5.org/documentation/how-tos/developers/organise-...
xer0trigger replied on at Permalink Reply
xer0trigger
Right, I'm not trying to redirect to the sub-directory since there is an existing live site right now. I'm accessing it with /c5/ in the path.
simbo1905 replied on at Permalink Reply
I dropped a .htaccess into the top of the site with permission 0666:

<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{REQUEST_URI} !^/concrete575/
RewriteRule (.*)http://www.mysite.net/concrete575/$1... [R=301,L]
</IfModule>

I was stuck a while it was only when I matched on REQUEST_URI that I could get anything working. I posted some notes about what that does over athttps://gist.github.com/simbo1905/f2ff8ead758faf9ed9e1f21ff3389cbc...