Forum Moderators: phranque
http:/localhost/faqs/
GET /faqs/ HTTP/1.1
Host: localhost
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:56.0) Gecko/20100101 Firefox/56.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: en-US,en;q=0.5
Accept-Encoding: gzip, deflate
Referer: http://localhost/faqs
Cookie: sc_is_visitor_unique=rx11463677.1508953424.EA25315350584FFF2F98A896A7A21A55.14.13.9.8.7.6.1.1.1
Connection: keep-alive
Upgrade-Insecure-Requests: 1
HTTP/1.1 404 Not Found
Date: Sat, 28 Oct 2017 23:11:29 GMT
Server: Apache/2.2.29 (Unix) mod_fastcgi/2.4.6 mod_wsgi/3.4 Python/2.7.8 PHP/5.6.2 mod_ssl/2.2.29 OpenSSL/0.9.8zh DAV/2 mod_perl/2.0.8 Perl/v5.20.0
Accept-Ranges: bytes
Keep-Alive: timeout=5, max=100
Connection: Keep-Alive
Transfer-Encoding: chunked
Content-Type: text/html
----------------------------------------------------------
http:/localhost/faqs/aascc.css
GET /faqs/aascc.css HTTP/1.1
Host: localhost
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:56.0) Gecko/20100101 Firefox/56.0
Accept: text/css,*/*;q=0.1
Accept-Language: en-US,en;q=0.5
Accept-Encoding: gzip, deflate
Referer: http://localhost/faqs/
Cookie: sc_is_visitor_unique=rx11463677.1508953424.EA25315350584FFF2F98A896A7A21A55.14.13.9.8.7.6.1.1.1
Connection: keep-alive
HTTP/1.1 404 Not Found
Date: Sat, 28 Oct 2017 23:11:29 GMT
Server: Apache/2.2.29 (Unix) mod_fastcgi/2.4.6 mod_wsgi/3.4 Python/2.7.8 PHP/5.6.2 mod_ssl/2.2.29 OpenSSL/0.9.8zh DAV/2 mod_perl/2.0.8 Perl/v5.20.0
Accept-Ranges: bytes
Keep-Alive: timeout=5, max=99
Connection: Keep-Alive
Transfer-Encoding: chunked
Content-Type: text/html
----------------------------------------------------------
http://localhost/faqs/script.js
GET /faqs/script.js HTTP/1.1
Host: localhost
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:56.0) Gecko/20100101 Firefox/56.0
Accept: */*
Accept-Language: en-US,en;q=0.5
Accept-Encoding: gzip, deflate
Referer: http://localhost/faqs/
Cookie: sc_is_visitor_unique=rx11463677.1508953424.EA25315350584FFF2F98A896A7A21A55.14.13.9.8.7.6.1.1.1
Connection: keep-alive
HTTP/1.1 404 Not Found
Date: Sat, 28 Oct 2017 23:11:29 GMT
Server: Apache/2.2.29 (Unix) mod_fastcgi/2.4.6 mod_wsgi/3.4 Python/2.7.8 PHP/5.6.2 mod_ssl/2.2.29 OpenSSL/0.9.8zh DAV/2 mod_perl/2.0.8 Perl/v5.20.0
Accept-Ranges: bytes
Keep-Alive: timeout=5, max=100
Connection: Keep-Alive
Transfer-Encoding: chunked
Content-Type: text/html
----------------------------------------------------------
http://localhost/faqs/images/smart-chiro-logo320b.jpg
GET /faqs/images/smart-chiro-logo320b.jpg HTTP/1.1
Host: localhost
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:56.0) Gecko/20100101 Firefox/56.0
Accept: */*
Accept-Language: en-US,en;q=0.5
Accept-Encoding: gzip, deflate
Referer: http://localhost/faqs/
Cookie: sc_is_visitor_unique=rx11463677.1508953424.EA25315350584FFF2F98A896A7A21A55.14.13.9.8.7.6.1.1.1
Connection: keep-alive
HTTP/1.1 404 Not Found
Date: Sat, 28 Oct 2017 23:11:29 GMT
Server: Apache/2.2.29 (Unix) mod_fastcgi/2.4.6 mod_wsgi/3.4 Python/2.7.8 PHP/5.6.2 mod_ssl/2.2.29 OpenSSL/0.9.8zh DAV/2 mod_perl/2.0.8 Perl/v5.20.0
Accept-Ranges: bytes
Keep-Alive: timeout=5, max=98
Connection: Keep-Alive
Transfer-Encoding: chunked
Content-Type: text/html
----------------------------------------------------------
http://localhost/faqs/script.js
GET /faqs/script.js HTTP/1.1
Host: localhost
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:56.0) Gecko/20100101 Firefox/56.0
Accept: */*
Accept-Language: en-US,en;q=0.5
Accept-Encoding: gzip, deflate
Referer: http://localhost/faqs/
Cookie: sc_is_visitor_unique=rx11463677.1508953424.EA25315350584FFF2F98A896A7A21A55.14.13.9.8.7.6.1.1.1
Connection: keep-alive
HTTP/1.1 404 Not Found
Date: Sat, 28 Oct 2017 23:11:29 GMT
Server: Apache/2.2.29 (Unix) mod_fastcgi/2.4.6 mod_wsgi/3.4 Python/2.7.8 PHP/5.6.2 mod_ssl/2.2.29 OpenSSL/0.9.8zh DAV/2 mod_perl/2.0.8 Perl/v5.20.0
Accept-Ranges: bytes
Keep-Alive: timeout=5, max=99
Connection: Keep-Alive
Transfer-Encoding: chunked
Content-Type: text/html
----------------------------------------------------------
http://localhost/faqs/images/smart-chiro-logo320b.jpg
GET /faqs/images/smart-chiro-logo320b.jpg HTTP/1.1
Host: localhost
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:56.0) Gecko/20100101 Firefox/56.0
Accept: */*
Accept-Language: en-US,en;q=0.5
Accept-Encoding: gzip, deflate
Referer: http://localhost/faqs/
Cookie: sc_is_visitor_unique=rx11463677.1508953424.EA25315350584FFF2F98A896A7A21A55.14.13.9.8.7.6.1.1.1
Connection: keep-alive
HTTP/1.1 404 Not Found
Date: Sat, 28 Oct 2017 23:11:29 GMT
Server: Apache/2.2.29 (Unix) mod_fastcgi/2.4.6 mod_wsgi/3.4 Python/2.7.8 PHP/5.6.2 mod_ssl/2.2.29 OpenSSL/0.9.8zh DAV/2 mod_perl/2.0.8 Perl/v5.20.0
Accept-Ranges: bytes
Keep-Alive: timeout=5, max=97
Connection: Keep-Alive
Transfer-Encoding: chunked
Content-Type: text/html
----------------------------------------------------------
Now when I type in faqs.html it goes to the faq page with the html removed, like it should.
http:/localhost/faqs/
GET /faqs/ HTTP/1.1
Why is the browser requesting /faqs/ when it is supposed to be requesting /faqs (rewritten to /faqs.html)?
Why does the 404 page use relative links?
the subsequent request for [localhost...] would be internally rewritten to /faq.html and i assume this response is a 200 status code with the proper content.
correct so far?
http:/localhost/faqs/
GET /faqs/ HTTP/1.1
this is a request for the trailing slash url, not the extensionless url.
does the /faqs/ subdirectory exist under the document root directory?
your server error log would probably tell you that the directory doesn't exist.
[Sun Oct 29 05:07:51 2017] [notice] caught SIGTERM, shutting down
[Mon Oct 30 12:50:51 2017] [notice] FastCGI: process manager initialized (pid 14152)
[Mon Oct 30 12:50:53 2017] [notice] Digest: generating secret for digest authentication ...
[Mon Oct 30 12:50:53 2017] [notice] Digest: done
[Mon Oct 30 12:50:53 2017] [notice] Apache/2.2.29 (Unix) mod_fastcgi/2.4.6 mod_wsgi/3.4 Python/2.7.8 PHP/5.6.2 mod_ssl/2.2.29 OpenSSL/0.9.8zh DAV/2 mod_perl/2.0.8 Perl/v5.20.0 configured -- resuming normal operations
[Mon Oct 30 12:52:19 2017] [error] [client ::1] File does not exist: /Applications/MAMP/htdocs/faqs, referer: http://localhost/faqs
[Mon Oct 30 12:52:19 2017] [error] [client ::1] File does not exist: /Applications/MAMP/htdocs/faqs, referer: http://localhost/faqs/
[Mon Oct 30 12:52:19 2017] [error] [client ::1] File does not exist: /Applications/MAMP/htdocs/faqs, referer: http://localhost/faqs/
[Mon Oct 30 12:52:19 2017] [error] [client ::1] File does not exist: /Applications/MAMP/htdocs/faqs, referer: http://localhost/faqs/
[Mon Oct 30 12:52:19 2017] [error] [client ::1] File does not exist: /Applications/MAMP/htdocs/faqs, referer: http://localhost/faqs/
[Mon Oct 30 12:52:19 2017] [error] [client ::1] File does not exist: /Applications/MAMP/htdocs/faqs, referer: http://localhost/faqs/
Mon Oct 30 12:57:19 2017] [error] [client ::1] File does not exist: /Applications/MAMP/htdocs/faqs, referer: http://localhost/faqs
[Mon Oct 30 12:57:19 2017] [error] [client ::1] File does not exist: /Applications/MAMP/htdocs/faqs, referer: http://localhost/faqs/
[Mon Oct 30 12:57:19 2017] [error] [client ::1] File does not exist: /Applications/MAMP/htdocs/faqs, referer: http://localhost/faqs/
[Mon Oct 30 12:57:19 2017] [error] [client ::1] File does not exist: /Applications/MAMP/htdocs/faqs, referer: http://localhost/faqs/
[Mon Oct 30 12:57:20 2017] [error] [client ::1] File does not exist: /Applications/MAMP/htdocs/faqs, referer: http://localhost/faqs/
[Mon Oct 30 12:57:20 2017] [error] [client ::1] File does not exist: /Applications/MAMP/htdocs/faqs, referer: http://localhost/faqs/
ErrorDocument 404 /missing.html
AddHandler server-parsed .html
#
Options +FollowSymLinks +Includes
RewriteEngine on
#
#External redirect for extensionless url
RewriteCond %{THE_REQUEST} \.html
#While on Localhost http://www.example.com is removed before / slash in the following
RewriteRule ^(.+)\.html$ /$1 [R=301,L]
#
# Internal rewrite for extensionless url
RewriteCond %{REQUEST_URI} !(\.[^./]+)$
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule (.*) /$1.html [L]
?. Description of what?
you need to describe ... in terms of The Request that was sent by your browser, the relevant HTTP Request headers, the status code of the HTTP Response, the relevant HTTP Response headers, and the body of the response.
you should include the entire chain of redirects, if any, in your description.
in all descriptions you should include what you expected to see and what you actually observed.
example.com
page1
page2
page3 (this is the page causing a problem with links to pages in directory - ignore hyphens)
---page1a
---page2a
---page3a
page3
page4
page5
page6