Forum Moderators: phranque

Message Too Old, No Replies

Modrewrite transparent rewrite

         

pskmaster

9:08 am on Nov 13, 2011 (gmt 0)

10+ Year Member



I currently have a domain/subdomain pointing to a folder called htdocs.

When the exampledomain.com is accessed I want it to get the files in /htdocs/dev/

Currently it gets the files in /htdocs/ and if the files that are in /dev/ they need to be accessed with exampledomain.com/dev/

How can I do this? I don't want to use a redirect. I don't want this to reflect in the address bar. I also don't want to change any server specifics as we're on a shared platform. What can be done with .htaccess?

Thanks for your help! It is greatly appreciated.

g1smd

9:25 am on Nov 13, 2011 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



You need a RewriteRule configured as an internal rewrite.

Browse previous threads as this question is asked in some form or another almost every day.

Post your code for discussion.

pskmaster

9:37 am on Nov 13, 2011 (gmt 0)

10+ Year Member



Which thread? Can you post the link please. Thanks!

lucy24

10:12 am on Nov 13, 2011 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Pick any random page of thread listings from this forum. Read them. By the time you are done, you should know everything you need to know about mod_rewrite, and probably a lot of stuff you never wanted to know.

You will also gain a pretty good idea of how to infuriate forums regulars ;)