I posted some details of my install here and didn't want to repost all that in this thread. Not sure if it is better forum etiquette to repost details here or provide a link to the details. But it may be helpful to read my first post.
http://drupal.org/node/1511654
I am not sure if this issue is related to the original issue I posted about so I thought I would post a new question.
This site was migrated from Linux to Windows. The home page comes up but every single link on the page takes me back to the home page. I have some links that have /?q= in front of them and they don't work either. I have made a few settings.php changes and used the db to clear cache but nothing seems to work.
I am taking this site over from another consultant and don't have access to him. I think the site was working correctly on the Linux server but I actually never saw it myself.
Thanks for any ideas on getting this working since the site was down several days before I was contacted to relocate it from Linux to Windows.
Comments
Could you attach/insert the
Could you attach/insert the site root .htaccess file?
Making Some Progress on Site
I found that the htaccess was not correct for IIS and so I got it changed to the following and now my site is somewhat functional.
I basically deleted all the code in the existing htaccess because apparently it was mostly directives that don't work with IIS. So I copied in the code and saved the file.
The site is functioning better. I can move around on a few pages. Below the code are my issues.
==========================
RewriteEngine on
# Block access to "hidden" directories whose names begin with a period. This
# includes directories used by version control systems such as Subversion or
# Git to store control files. Files whose names begin with a period, as well
# as the control files used by CVS, are protected by the FilesMatch directive
# above.
#
# NOTE: This only works when mod_rewrite is loaded. Without mod_rewrite, it is
# not possible to block access to entire directories from .htaccess, because
# is not allowed here.
#
# If you do not have mod_rewrite installed, you should remove these
# directories from your webroot or otherwise protect them from being
# downloaded.
RewriteRule "(^|/)\." - [F]
# If your site can be accessed both with and without the 'www.' prefix, you
# can use one of the following settings to redirect users to your preferred
# URL, either WITH or WITHOUT the 'www.' prefix. Choose ONLY one option:
#
# To redirect all users to access the site WITH the 'www.' prefix,
# (http://example.com/... will be redirected to http://www.example.com/...)
# uncomment the following:
RewriteCond %{HTTP_HOST} !^www\. [NC]
RewriteRule .? http://www.%{HTTP_HOST}%{REQUEST_URI} [L,R=301,NS]
#
# To redirect all users to access the site WITHOUT the 'www.' prefix,
# (http://www.example.com/... will be redirected to http://example.com/...)
# uncomment the following:
# RewriteCond %{HTTP_HOST} ^www\.(.+)$ [NC]
# RewriteRule ^ http://%1%{REQUEST_URI} [L,R=301]
# Modify the RewriteBase if you are using Drupal in a subdirectory or in a
# VirtualDocumentRoot and the rewrite rules are not working properly.
# For example if your site is at http://example.com/drupal uncomment and
# modify the following line:
# RewriteBase /drupal
#
# If your site is running in a VirtualDocumentRoot at http://example.com/,
# uncomment the following line:
RewriteBase /
# Pass all requests not referring directly to files in the filesystem to
# index.php. Clean URLs are handled in drupal_environment_initialize().
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !^/favicon.ico [NC]
RewriteRule .? index.php [L]
# Rules to correctly serve gzip compressed CSS and JS files.
# Requires both mod_rewrite and mod_headers to be enabled.
# Serve gzip compressed CSS files if they exist and the client accepts gzip.
RewriteCond %{HTTP:Accept-encoding} gzip
RewriteCond %{REQUEST_FILENAME}\.gz -s
RewriteRule ^(.*)\.css $1\.css\.gz [QSA]
# Serve gzip compressed JS files if they exist and the client accepts gzip.
RewriteCond %{HTTP:Accept-encoding} gzip
RewriteCond %{REQUEST_FILENAME}\.gz -s
RewriteRule ^(.*)\.js $1\.js\.gz [QSA]
# Serve correct content types, and prevent mod_deflate double gzip.
RewriteRule \.css\.gz$ - [T=text/css,E=no-gzip:1]
RewriteRule \.js\.gz$ - [T=text/javascript,E=no-gzip:1]
# Serve correct encoding type.
Header append Content-Encoding gzip
# Force proxies to cache gzipped & non-gzipped css/js files separately.
Header append Vary Accept-Encoding
=======================================
If I just type blueribbonschools.com into a browser I sometimes first get redirected to a page that has It Works on it. Then if I refresh the page the site comes up. I don't see any other web pages that have It Works in the code anywhere. So could this be dynamically generated somehow?
The main menu at the top of the page had 5 links. 3 had clean urls like http://www.blueribbonschools.com/conferences and two have full urls like http://www.blueribbonschools.com/?q=about. The full urls worked fine but the clean urls don't work and just redirect to the home page. I was finally able to get a valid Admin login and so I was able to find the menu settings and change all these links to use full urls.
If I turn on clean urls in either the db directly or settings.php using
$conf['clean_url'] = 1; I see that every link I click tries to use a clean url but as I said they don't work.
Also there are a bunch of sitewide links on every page at the bottom left that all reference clean urls. The internal pages also have a lot of clean links used. So none of them work either.
Any other ideas you have to get the clean urls working and the mysterious "It Works" page that sometimes pops up would be so much appreciated.
"It Works!" means browser is
"It Works!" means browser is redirected to a Web server default page.
One of the ways to understand what is wrong is to use RewriteLog/RewriteLogLevel directives -
http://httpd.apache.org/docs/2.2/mod/mod_rewrite.html#RewriteLog
but the first question is - why not to start with Drupal default .htaccess, make everything work as expected and after that start to add directives for finer processing (such as handling 'www.' domain part)?
I suppose that could be easier to troubleshoot.
The main mod_rewrite Drupal magic looks like
That differs from what's in your file. Perhaps you could tell also tell what IIS version is used?
Thanks.