The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums Other htaccess url rewrite issue

  • This topic is empty.
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
  • #32410

    Hi! Thanks for looking at my post!

    I am using an .htaccess file to rewrite my urls from:




    Up until last week, this was working just fine. But now, all files titled index.php are displaying only their folder name as before (e.g. domain.tld/Folder/About-Us/ in the browser bar, and domain.tld/Folder/About-Us/index.php is being served) but all other files located next to the index.php are returning a 404 error. The file exists if you call it directly (domain.tld/Folder/About-Us/Location/ returns a 404 error, but domain.tld/Folder/About-Us/Location.php returns the correct page.)

    My .htaccess file is short and sweet, and as follows:

    Options +FollowSymLinks
    Options +Indexes
    RewriteEngine on

    # remove the php file extension
    RewriteCond %{SCRIPT_FILENAME} !-d
    RewriteRule ^([^.]+)/$ /$1.php [NC,L]

    I’m not clear what changed that it has stopped working. Currently the .htaccess file resides in the same place: root/web-folders/site-folder/Home.php).There is more than one website on my shared hosting server (GoDaddy) but this is the only .htaccess file I’m using.

    I’ve been working for hours now and can’t seem to make enough sense of the possible issue to be able to solve this on my own. This has got to be mind-numbingly simple, but I just can’t get it. Thank you to anyone who can shed some light on this issue.


    No help available?


    Okay, that’s too bad. Thanks for looking this over anyway.

    I’ve managed a word-around, but unfortunately I don’t know what went wrong in the first place. You can all agree that this outcome is terribly dissatisfying. Particularly since my work around is not nearly as elegant as my first solution. :-(


    Thanks Josh — Where did you move to? Your comments are something I’ve run across elsewhere as well.

Viewing 4 posts - 1 through 4 (of 4 total)
  • The forum ‘Other’ is closed to new topics and replies.