This is a topic that was brought up in the old forums but never found a solution so I wanted to continue you it here to see if there is a solution to be found.
Link to same topic in old forums.
A quick recap:
Since EE 1.6.5, URLs are able to have periods in them.
Some people (including me) are having issues removing index.php using an htaccess file in the case where an automatically generated URI has a period in it.
For example, if you visit:
http://supergeekery.com/index.php/geekblog/comments/testing_with_this_entry._no_need_to_read
it will work as expected. It shows the expected entry.
If you visit:
http://supergeekery.com/geekblog/comments/testing_with_this_entry._no_need_to_read
it will not. Not only does it not throw a 404 which I wish is would (another problem I’m trying to solve), it doesn’t actually pass the correct URI to the database.
(Those are temporary URLs that will be deleted soon, BTW.)
First, I’ll show you my super basic htaccess file.
RewriteEngine On
# is this NOT a request for a regular file? ie !-f
RewriteCond %{REQUEST_FILENAME} !-f
# is this NOT a request for an existing directory? ie !-d
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /index.php?/$1 [L]
# EE 404 page for missing pages
ErrorDocument 404 /index.php/staticpages/404Simple, I think.
Next if I’ve got some screenshots showing the URIs that are being passed into the EE system.
If I’m using index.php, the URI is correct. It has the period in the URI.
http://emberapp.com/johnfmorton/images/google-chrome-2/sizes/m.png
If I’m using the htaccess rules above, the period is substituted with an underscore. I’m unsure why that’s happening.
http://emberapp.com/johnfmorton/images/google-chrome-3/sizes/m.png
What’s NOT showing in the above image is the HTTP HEADERS for this URL. It shows the QUERY_STRING to be correct: /geekblog/comments/testing_with_this_entry._no_need_to_read.
The ‘easy’ solution would be for no URI to have periods. It wouldn’t solve the problem, but it would at least avoid it.
In the EE-pre-1.6.5 days, when a URI was being automatically generated for you, what happened when you typed a period into your title area? I assume it didn’t automatically insert a period because it wasn’t a valid URI for EE then. Is there any way to toggle that behavior back on?
Ideally I would like to fix the redirection of existing URLs and have them work. Next I would like to turn off the behavior of having periods in the URIs to begin with.
Any thoughts?
(This issue, of not getting the 404 for a non-existing URIs, may or may not be related to this problem.)