Forum Moderators: phranque
I am rewriting psudo urls for a project but I need a files directory to match these psudo names. the system can rewrite many sub level folders too.
psudo url = domain.com/somesub/somesubtwo/blah/blah/docs/image.jpg
real url = /docs/image.jpg
the docs directory will be on root.
so far I have tried
RewriteRule ^(.*)/docs/$ docs/$1 [L]
thank for any help
RewriteRule ^(.+)/docs/$ /docs/$1 [L]
If multiple values are allowed, then the script must produce unique content for each allowed value. Otherwise, this whole plan does not sound like a good idea... Try a search on "duplicate content" here on WebmasterWorld to read some of the potential problems.
In simple terms, for each resource defined on your site by its unique content, that resource should be accessible by one and only one canonical URL, and all non-canonical variations of that URL should redirect to the canonical URL or return 404-Not Found or 410-Gone.
Jim