0
votes

Migrated a site to a development server and am getting strange behavior. No issue on the original box. Did a manual move, i.e. scp'd files over to new box, mysqldump of database on old box & restore database on new box and edited configuration.php file to point to new settings on dev box

I can hit the home page and all is well but for all menus I get a 404 error. The config file shows url rewriting on and set on

public $sef = '1';
public $sef_rewrite = '1';

What is even stranger is that if I turn off sef most things work but not all. For example I can call http://my.test.site/index.php?option=com_content&view=category&layout=blog&id=41&Itemid=116 and in the Apache access log I will get a 200 Response code but a blank page in the browser.

I have tried turning the set and rewrite settings on and off, clearing the cache and have been in the .htaccess file where I have toggled RewriteBase / on and off to no effect.

Anyone with ideas?

Dev Box - Apache 2.4.2 with PHP 5.5.3 and Joomla! 3.1.5 Stable [ Ember ]

Apache Modules Loaded via apachectl -t -D DUMP_MODULES

 core_module (static)
 so_module (static)
 watchdog_module (static)
 http_module (static)
 log_config_module (static)
 logio_module (static)
 version_module (static)
 unixd_module (static)
 unixd_module (static)
 access_compat_module (shared)
 alias_module (shared)
 auth_basic_module (shared)
 authn_core_module (shared)
 authn_file_module (shared)
 authz_core_module (shared)
 authz_groupfile_module (shared)
 authz_host_module (shared)
 authz_user_module (shared)
 autoindex_module (shared)
 cgi_module (shared)
 cgid_module (shared)
 deflate_module (shared)
 dir_module (shared)
 env_module (shared)
 filter_module (shared)
 geoip_module (shared)
 headers_module (shared)
 mime_module (shared)
 mpm_prefork_module (shared)
 negotiation_module (shared)
 reqtimeout_module (shared)
 rewrite_module (shared)
 setenvif_module (shared)
 socache_shmcb_module (shared)
 ssl_module (shared)
 status_module (shared)
 unique_id_module (shared)
 php5_module (shared)

Edit - I also have looked in my php and joomla logs and nothing comes up

Update - Made some progress. Non sef URL's are all working. Finally traced it to a missing module (images). Still no progress on sef URL however. All 404's on all other pages

1

1 Answers

0
votes

After going through a bunch of forums and emails my thoughts were the .htaccess file. I went through many permutations but nothing seemed to help.

By accident I checked to see of mod_rewrite was loaded and functioning. I was pretty sure it was loaded and it was but it was not working. I did a test and could not get it to rewrite my URL's

e.g. I added this to my .htaccess file

Options +FollowSymLinks
Redirect /cnn.html http://www.cnn.com

What I found was the in the Apache conf file the default install had AllowOverride None when it should have been AllowOverride All. Once I made that change and restarted it was good to go