Jump to content

Apache Config: Directory spoofing, help please


gas, meet foot

Recommended Posts

I've read some .htaccess tutorials, but I'm still not quite able to achieve what I want to do.

 

I have installed a php content management system on a server in a subdirectory to root, and I want Apache to treat that subdirectory as if it were root. Example: example.com/testinstall/ should be treated as example.com/ .

 

If I edit .htaccess, I can just redirect people, but if they follow any links after the first page, the links show the true path. If I edit http.conf, to use that directory as root, then my existing urls which refer to content from root will not work.

 

Do I want to use mod_proxy for this? I have only used that in the past for masking a tomcat instance, but I suppose it would work for the path, too. Can anyone offer some advice?

 

Edit: Would URL rewriting accomplish this? I suppose the regex could just swap '/' for '/test/' ...

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.