htaccess rewrite remember bad urls

Discussion in 'Programming' started by ptalent, Dec 14, 2011.

  1. #1
    Hi,

    I have been building an admin section with friend URLs (with the intention of making the whole site with SEF URLs), so have been experimenting with mod_rewrite in htaccess and pairing it with a php url split.

    I have got it working for some URLs and any new ones, but a few current URLs have been "remembered".

    For example:
    www.mysite.com/admin/dashboard/ is fine and gets interpreted as /admin/index.php
    www.mysite.com/admin/users/ is also fine, same as above

    www.mysite.com/admin/content/ shows a blank page (this cant be going to admin/index.php)
    www.mysite.com/admin/ecommerce/ gets redirects to www.mysite.com/ecommerce.php (what the hell!?)

    Looking at my code, it should all go to index.php as per the top 2 examples, but this fails to capture the other 2 examples. If i alter the URLs slightly, e.g. /ecommerce1/ then it loves it.

    I can only assume it is bugged or remembering some duff history or URLs. Is there anyway to "flush" it?

    My .htaccess file in my admin directory is very simple:

    RewriteEngine on
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteRule . index.php [L]

    ErrorDocument 404 /404.php


    lots of love
     
    ptalent, Dec 14, 2011 IP