Recently I have been working on a facelift for my website, so I put all the needed files into a directory called newVersion. Now when I go to this URL:
Does anyone know whey I have to use the full path otherwise the RewriteRule does not work? Does it have anything to do with the fact that I’m running this .htaccess file from within a subdirectory instead of from the root?
I don’t remember exactly but make sure you have options MultiViews or options +FollowSymLinks on in .htaccess, try both (seperatley) and see which one works.
[font=verdana]I’m not sure of why it isn’t working (Apache isn’t my forté), but one thing to point out … I hope this is just a development phase, and not a long-term thing. Having “newversion/” as part of a public URL is just awful. It looks so amateurish, adds a completely unnecessary layer of complexity to the URL (and an additional point of failure for people typing it in), hurts your SEO and looks completely ridiculous when you next revamp the site.
PS - where you’re just demonstrating a URL, please don’t allow it to become hyperlinked – either leave off the [noparse]http://www. at the start, or wrap it in [noparse]…[/noparse][/noparse] tags.
Stevie, not to worry, newVersion is just a temporary thing where I do all my testing. Once all is complete I will replace the code at the root with the code that is in /newVersion
You forced the display of the redirection with the absolute (external) redirection, i.e., http://yadda-yadda. The R=301 (permanent redirection) flag will do the same thing, too, so don’t use that if you need to hide your URIs.
The only reason I can think of is a problem with the PHP script. The only other possible reason is a default output which might happen if tID is not the correct key.