IsaacSchlueter Posted June 15, 2004 Share Posted June 15, 2004 First of all, I've only been a customer for a few days, and WOW! TCH is amazing! I'm truly in love. Now on to the problem I have a site that is driven by a bunch of php scripts. I use the extra path info directive to avoid having ?s and &s in the URL. I also prefer to strip the ".php" from my URLs, so that I have something like this: http://www.isaacschlueter.com/blog/2004/05 to show all the posts in the "blog" category, from May, 2004. Of course, the actual file is "blog.php". I was doing this on my previous webhost by putting the following in my .htaccess folder. (It's a little ugly, but it's the only way that I could get it to work.) >RewriteEngine On # If it's just /blah, change it to /blah.php RewriteRule (^[^\./]+)$ $1\.php # If it's /blah/1/2/3, change to /blah.php/1/2/3 RewriteRule (^[^\./]+)/([^\.]*)(.html?)?$ $1\.php/$2$3 # Cleanup Unwanted the RR Tracks, for cases when it's a valid directory # If it's /validdirectory.php/1/2/3, change to /validdirectory/1/2/3 RewriteRule ^(xmlsrv)(\.php)/(.*) $1/$3 RewriteRule ^(htsrv)(\.php)/(.*) $1/$3 RewriteRule ^(admin)(\.php)/(.*) $1/$3 RewriteRule ^(skins)(\.php)/(.*) $1/$3 RewriteRule ^(ari)(\.php)/(.*) $1/$3 RewriteRule ^(httest)(\.php)/(.*) $1/$3 When I do this, it works fine for the URLs. And, for some reason, I can go to http://www.isaacschlueter.com/admin/whatever.php without any problem. But, http://www.isaacschlueter.com/htsrv/login.php gives an Error 500: Internal Server Error. I'm sure that it's some sort of problem with the RewriteRule stuff, because when I remove them, then everything works (but I have to put .php on my urls, of course.) For the time being, I've removed them all, but if you'd like to see what happens, just post here, and I'll upload the .htaccess again. Any ideas? Anyone know of a cleaner way to do what I'm trying to do? If I manage to figure it out, I'll post here to help any lost souls in this predicament in the future Thanks Quote Link to comment Share on other sites More sharing options...
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.