Log in

View Full Version : URL Rewriting



rakeshg
06-04-2010, 07:51 AM
Hello i stuck on some place

i have my site as "test" containing 5 sub folders and some files

and want to create sub domain as that sub domain will access the files and folders of the main site directly (no need to put any folder or file in the sub domain folder)


(1)test/subdomain/test.php will access test/test.php(url will be:test/subdomain/test.php)
(2)test/subdomain/folder1/test.php will access test/folder1/test.php(url will be:test/subdomain/folder1/test.php)
(3)test/subdomain/folder1/folder2/test.php will access test/folder1/folder2/test.php(url will be:test/subdomain/folder1/folder2/test.php)

djr33
06-04-2010, 09:18 AM
There are ways to do this, but it would be easier to just setup the DNS to mirror the main site through the subdomain. It's easy (once you find the options), and you won't need to do anything to maintain it.

If not, you can use htaccess and mod_rewrite, but that's something best avoided if possible.

rakeshg
06-04-2010, 10:12 AM
Thanks,
But subdomains will be more admin can add lots of subdomains(affiliates) so DNS to mirror the main site through the subdomain is possible????