lostcommander
Member
- Messages
- 52
- Reaction score
- 0
- Points
- 6
I am trying to hide a directory using mod_rewrite such that:
visitor asks for mysite.tld/dir/anyfile.ext
visitor gets redirected to mysite.tld/anyfile.ext
I tried to do this through .htaccess and mod_rewrite using:
RewriteRule ^dir/{1}(.*)$ $1 [R]
Unfortunately, what this is doing is:
visitor asks for mysite.tld/dir/anyfile.ext
visitor gets redirected to mysite.tld/home/user/public_html/anyfile.ext
... WTH?!? :nuts:
Thank you very much. Any help is appreciated.
P.S. I have already done my best to read through all of:
http://www.yourhtmlsource.com/sitemanagement/urlrewriting.html
http://www.sitepoint.com/article/guide-url-rewriting/2/
http://www.workingwith.me.uk/articles/scripting/mod_rewrite
http://httpd.apache.org/docs/2.0/mod/mod_rewrite.html
http://httpd.apache.org/docs/2.0/misc/rewriteguide.html
I've also done a few searches for relevant threads in this forum already. So I'm afraid that much more reading is just going to make my eyes bug out.
visitor asks for mysite.tld/dir/anyfile.ext
visitor gets redirected to mysite.tld/anyfile.ext
I tried to do this through .htaccess and mod_rewrite using:
RewriteRule ^dir/{1}(.*)$ $1 [R]
Unfortunately, what this is doing is:
visitor asks for mysite.tld/dir/anyfile.ext
visitor gets redirected to mysite.tld/home/user/public_html/anyfile.ext
... WTH?!? :nuts:
Thank you very much. Any help is appreciated.
P.S. I have already done my best to read through all of:
http://www.yourhtmlsource.com/sitemanagement/urlrewriting.html
http://www.sitepoint.com/article/guide-url-rewriting/2/
http://www.workingwith.me.uk/articles/scripting/mod_rewrite
http://httpd.apache.org/docs/2.0/mod/mod_rewrite.html
http://httpd.apache.org/docs/2.0/misc/rewriteguide.html
I've also done a few searches for relevant threads in this forum already. So I'm afraid that much more reading is just going to make my eyes bug out.