php - How is this URL being mapped in Apache? -


i've taken on project old developer disappeared, , first self-assigned task able replicate entire stack on ec2 host.

on original pre-existing host, can hit url http://www.example.com/users/login/ (i can drop trailing slash , hits login page fine).

looking through source code in /var/www/[example.com]/ -- can find sections/users/login.php looks html page rendered from.

i have same code in secondary ec2 host, i'm not bothering use virtual hosts, i'm putting in /var/www/html/ (rather /var/www/[example.com]/), i'm getting 404.

where should mapping points http://www.example.com/users/login/ /sections/users/login.php?

i not well-acquainted rewriterule stuff, 2 .htaccess files in repo, , in httpd.conf, see nothing 'sections' anywhere, i'm not sure look.

the .htaccess in root directory is:

php_value post_max_size 1024m php_value upload_max_filesize 1024m php_value memory_limit 1024m php_value max_input_time 1800 php_value max_execution_time 1900 php_value session.gc_maxlifetime 7200  <ifmodule mod_rewrite.c>     rewriteengine on      rewritecond %{http_host} ^(.*)example.mobi [nc]     rewriterule ^(.*)$ http://%1example.com/$1 [r=301,l]      rewritecond %{http_host} ^(.*)example.us [nc]     rewriterule ^(.*)$ http://%1example.com/$1 [r=301,l]      rewritebase /      rewriteengine on     rewritecond %{http_host} ^[^.]+\.[^.]+$     rewriterule ^(.*)$ http://www.%{http_host}/$1 [l,r=301]      rewriterule ^(.*)\.vcf vcf.php [l]      rewriterule ^shared/(.*)$ /$1 [l,nc,r]      rewritecond %{request_filename} !-f     rewritecond %{request_filename} !-d     rewriterule . /index.php [l] </ifmodule>  options -indexes 

in case, appears rewriterule rewriting requests index.php file. common in frameworks can accomplish without framework. inside index.php file parsing query string , re-mapping appropriate php files.

it should noted rewrite index.php file if not find matching file or directory in request - that's rule does:

rewritecond %{request_filename} !-f rewritecond %{request_filename} !-d 

Comments

Popular posts from this blog

get url and add instance to a model with prefilled foreign key :django admin -

css - Make div keyboard-scrollable in jQuery Mobile? -

ruby on rails - Seeing duplicate requests handled with Unicorn -