• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Newbie Error, migrating site & anything other than default controller won't fire

#11
[eluser]Guiseppi[/eluser]
it's ver 1.7.1

my config.php is as follows (less the commented out code):
Code:
<?php  if ( ! defined('BASEPATH')) exit('No direct script access allowed');
$config['base_url']     = "http:://ec2-174-129-69-106.compute-1.amazonaws.com/";
$config['index_page'] = "";
$config['uri_protocol'] = "QUERY_STRING"; //AUTO
$config['url_suffix'] = "";
$config['language']     = "english";
$config['charset'] = "UTF-8";
$config['enable_hooks'] = FALSE;
$config['subclass_prefix'] = 'MY_';
$config['permitted_uri_chars'] = 'a-z 0-9~%.:_\-';
$config['enable_query_strings'] = FALSE;
$config['controller_trigger']   = 'c';
$config['function_trigger']     = 'm';
$config['directory_trigger']    = 'd'; // experimental not currently in use
$config['log_threshold'] = 0;
$config['log_path'] = '';
$config['log_date_format'] = 'Y-m-d H:i:s';
$config['cache_path'] = '';
$config['encryption_key'] = "";
$config['sess_cookie_name']             = 'ci_session';
$config['sess_expiration']              = 7200;
$config['sess_encrypt_cookie']  = FALSE;
$config['sess_use_database']    = FALSE;
$config['sess_table_name']              = 'ci_sessions';
$config['sess_match_ip']                = FALSE;
$config['sess_match_useragent'] = TRUE;
$config['sess_time_to_update']  = 300;
$config['cookie_prefix']        = "";
$config['cookie_domain']        = "";
$config['cookie_path']          = "/";
$config['global_xss_filtering'] = FALSE;
$config['compress_output'] = FALSE;
$config['time_reference'] = 'local';
$config['rewrite_short_tags'] = FALSE;
$config['proxy_ips'] = '';

#12
[eluser]micflan[/eluser]
Why are you using uri_protocol QUERY_STRING ? Try changing to AUTO.

#13
[eluser]Guiseppi[/eluser]
It was previously set to AUTO (note the //AUTO), the change was made to try something new.

Neither result in the solution.

It's now set back to AUTO & it's still not working for me.
Thx for the suggestion though...

#14
[eluser]micflan[/eluser]
And are you absolutely sure the htaccess is working in that directory? Is this the default apache site or a virtual host?

(I'm thinking you might have AllowOverride None set on the virtual host?)

You could test the htaccess by creating a file in the root called newfile.php, adding this to .htaccess:

Code:
RewriteRule ^oldfile$ /newfile.php [NC,L]

And try to access http://yoursite/oldfile

#15
[eluser]Guiseppi[/eluser]
[quote author="micflan" date="1302810918"]And are you absolutely sure the htaccess is working in that directory? Is this the default apache site or a virtual host?

(I'm thinking you might have AllowOverride None set on the virtual host?)

You could test the htaccess by creating a file in the root called newfile.php, adding this to .htaccess:

Code:
RewriteRule ^oldfile$ /newfile.php [NC,L]

And try to access http://yoursite/oldfile[/quote]

I've only altered DocumentRoot in /etc/apache2/httpd.conf to point to my /migrated site.

Here are my current AllowOverride settings for httpd.conf:
Code:
# forbid access to the entire filesystem by default
<Directory />
    Options None
    AllowOverride All
    Order deny,allow
    Deny from all
</Directory>

# use .htaccess files for overriding,
AccessFileName .htaccess
# and never show them
<Files ~ "^\.ht">
    Order allow,deny
    Deny from all
</Files>

permissions on .htaccess are 644

I tried both:
Code:
RewriteRule ^oldfile$ /newfile.php [NC,L]
Code:
RewriteRule ^oldfile.php$ /newfile.php [NC,L]
Then tried accessing:
http://yoursite/oldfile & http://yoursite/oldfile.php

Nothing worked, seems as though .htaccess isn't grabbing, it appears I'm overlooking something obvious to the seasoned user?

#16
[eluser]micflan[/eluser]
Do you have a file at /etc/apache2/sites-available/default ? If so, print the contents of that please.

#17
[eluser]Guiseppi[/eluser]
I do not. This is the basic SuSe 11/LAMP stack install on AWS, with only my /migratedsite moved over & the minor tweaks we've discussed so far.

#18
[eluser]micflan[/eluser]
Do you have a sites-available folder at all? Any files in there?

If not... Undecided. At least you know what you're looking for now, if you didn't before... looks like the htaccess isn't working! Google it up.

#19
[eluser]Guiseppi[/eluser]
Thanks for the feedback, I'll look into it & report back later today.

#20
[eluser]Guiseppi[/eluser]
Ok, I'm digging back in. Problem still exists (if anyone can help?)

So, with AWS running apache2 default setup, I've made the following adds/adjustments:

in httpd.conf:
Code:
LoadModule rewrite_module /usr/lib64/apache2/mod_rewrite.so

Under Virtual Server Configuration in httpd.conf:
Code:
Include /etc/apache2/vhosts.d/*.conf

Then I copied the /vhosts.d/vhost.template > /vhosts.d/mysite.com.conf & mapped the flle paths to my content correctly.
Now the mysite.com virtual host shows up via the domain. Great.

Now I test for mod_rewrite again - When I lookup phpinfo(); , mod_rewrite shows up under installed modules.

Next I add success.html in the folder for the content, and an almost empty .htaccess file:
Code:
<IfModule mod_rewrite.so>
RewriteEngine on RewriteRule .* success.html
</IfModule>

Mod_rewrite fails to redirect > success.html

I've tried this with as well, no go:
Code:
<IfModule mod_rewrite.c>
RewriteEngine on RewriteRule .* success.html
</IfModule>

PS: I can get success.html to show by hitting it directly via mysite.com/success.html so I know it's not a permissions issue.

Help, Any further ideas?


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2021 MyBB Group.