Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

5
  • so /ra/ was just an example directory, I have a lot of them within the /php/ folder as well as hundreds of files that I obviously can't write individual rules for. I'm not familiar with how htaccess scripts work so which parts of your reply would I need to replicate to reach all the individual subdirectories? I have 5 or so that I need to duplicate the rewrite for. Also how can I wildcard the filename? It's obviously not file.php Commented Jun 24, 2015 at 4:15
  • 1
    Examples like that tend to not help. We have to know the exact requirements or I can't give a proper solution. If you give a specific example/file, I give a specific answer. Update your question with the exact requirements and see if it can be done the way you want it. Commented Jun 24, 2015 at 4:24
  • apologies I edited my post again. I mostly am just having trouble understanding how the code you wrote functions and was more so looking for a further explanation so I could take a crack at it. Commented Jun 24, 2015 at 4:35
  • 1
    So whether example.php exists in /php/ra or /php/hbu or just plain /php it still amounts to hospitaldatasolutions.com/example.php That will not work. How will apache know which folder to check for that file? you can't have a simple file and expect it to know which folder to look in. That's not how rewrite works. Commented Jun 24, 2015 at 4:40
  • I'm just trying to hide my directory structure. I can't just tell it that if someone goes to a file in a certain directory to remove /php/ra from the url? Even with multiple .htaccess files for each directory? Commented Jun 24, 2015 at 4:51