Jump to content

Mod_rewriting to destinations that use mod_rewrite


Nudd

Recommended Posts

I already have a functioning rewrite system that when someone requests one directorydirectory under the root,

it rewrites (in the background) the urls to point to a different location where all of the fully functional scripts are:

 

ie:

User goes to http://www.example.com/directory1/post.php and sees that in the URI string in their browser

The script that is invoked is actually http://www.example.com/admindirectory/post.php

 

User goes to http://www.example.com/directory2/get.php and sees that in the URI string in their browser

The script that is invoked is actually http://www.example.com/admindirectory/get.php

 

(Again, let's imagine this already works)

 

What I want to do is have domains on this account that 'silently' point to the selected directory and invoke the same sets

of above rewrites.

 

ie:

User goes to http://www.newexample.com/post.php and sees that in the URI string in their browser

The URI in the background is actually http://www.example.com/directory1/post.php

The script that is invoked is actually http://www.example.com/admindirectory/post.php

 

User goes to http://www.secondexample.com/get.php and sees that in the URI string in their browser

The URI in the background is actually http://www.example.com/directory2/get.php

The script that is invoked is actually http://www.example.com/admindirectory/get.php

 

Again, the directories rewrite properly on their own - how would I go about passing off rewrites from the document root to these functioning directories, maintaining the file and query strings so that the directory specific .htaccess files can interpret them correctly?

 

Thanks in advance for any help.

 

 

 

 

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.