Hi there Dklynn
Thank you again for your efforts and time taken.
Despite our good efforts, I think we are still having ‘commincation problems’ (probably my fault!).
You were, I think, very close to the mark with your first interpretation of my needs. And your first solution worked fine except for "
[I]www.northwoodcomputerrepairs.co.uk/news/ works
www.northwoodcomputerrepairs.co.uk/news kinda works…
When the above is typed in, the Address bar then shows:
[/I]"
To clairfy (maybe I should have mentioned this to begin with, but I didn’t want to include ‘unecassary’ information and complicate matters): I have a basic ‘virtual hosting’ account. I can’t change any but the most basic envirmoent vairables, through cPanel (a cut down version I think) (changing document root is a no-no).
I have one hosting account, with multiple ‘htaccess-based sites’, each within it’s own sub-dir of root. {Root}\NCR is one, but there are others.
So I could not have EVERYTHING go to {Root}\NCR , as it would mess-up the other domains. I simply want all northwoodcomputerrepairs.co.uk pages to be taken from the ncr dir as if ncr was the root directory.
This all works fine (invisible to the end-user/search engine), except for the stated problem.
- I had tried my own code to remove /ncr, from the URL is if already present, but both mine and your most recent code (the “RewriteRule ^ncr/(.*)$ $1 [NS,R=301,L]” line specifically.), puts the server/browser in an infinite loop.
I’m sad to say, I can’t fully understand the syntax of your code, but if I remove the “RewriteRule ^ncr/(.*)$ $1 [NS,R=301,L]”, and just use:
[I]RewriteCond %{REQUEST_URI} !^ncr/
redirect request to the ncr subdirectory
RewriteRule .? ncr%{REQUEST_URI} [L][/I]
Then I get no loop, but a page titled “Internal Server Error” which mentions at the bottom “Additionally, a 500 Internal Server Error error was encountered while trying to use an ErrorDocument to handle the request.”
Could it be that the problem is not shoddy htaccess commands, but a bug in the Server setup? Any other ideas?
I totally understand if you’re tired of this now…