redbullmarky Posted July 15, 2006 Share Posted July 15, 2006 Hi allJust hoping to get some help re mod rewrite. I managed to solve the last problem, but now I've got one more I could do with some best-practice advice on, which is handling virtual directories/subdirectories, etc.For example:"/redbullmarky" or "/redbullmarky/" should resolve to /profile.php?user=redbullmarky"/redbullmarky/blogs" should resolve to /blogs/index.php?user=redbullmarky"/redbullmarky/blogs/123" should resolve to /blogs/index.php?user=redbullmarky&blog=123"/redbullmarky/something/" should resolve to /whatever.phpetc etc.so basically, the username is variable, whatever follows is fixed. the problem is just trying to write a condition that will a) ignore any trailing slashes if nothing follows and b) go to correect page without redirecting - ie, i want to keep the nicely formatted URL.any ideas?currently i have everything that's not a 'system' file going to a 'redirect.php' file which does the dirtywork, but i want to maintain the clean URL'sany thoughts?cheersMark Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.