Forum Moderators: phranque
RewriteEngine On
RewriteRule index\.html www.domain.com/index.php?id=value
To mask the URL I need to write logical address ( script is under 2 directories - _sub/subdomain/ )
[code]
RewriteEngine On
RewriteRule index\.html ../../index.php?id=value
But this is not functional - error 404. Can you help me, please? Can I swap the string "../../" with any, which can mod_rewrite accept? I tried soft link ( like /server/domain/www/index.php?id=value ), but it doesnt work.
Welcome to WebmasterWorld.
I am not sure I understand the question or what you are trying to accomplish...
Is the index.php on the sub-domain, but needing to be opened/executed on the TLD? If so, you will need to use a [P] proxy flag to keep from redirecting.
What do you mean by logical? Do you need to open the index.php of a specific directory?
EG
/somedir/anotherdir/somefile.html should open /somedir/anotherdir/index.php?someparam
OR
/somedir/anotherdir/somefile.html should open /yetanotherdir/onemoredir/index.php?someparam
OR
/somedir/anotherdir/somefile.html should open /index.php?someparam
Please, let us know exactly what you are looking for --- (Maybe it's there and I am not seeing it, but I am kind of slow some times.)
Justin
index.php is on TLD - for example www.tld.com. I have there www.tld.com/index.php?search=value. I need to have subdomains searched_text.tld.com - which will open www.tld.com/index.php?search=searched_text ( but not automaticaly - becouse I have some subdomains, which I need to stay functional ).
Sorry for confusing you :-)
I have found one admin, who said, that this error is occured by the newest version of php4 ( I have on the server php 4.4.1 ). He said, that this was functional with older versions of php4. After updating to php 4.4.1, rewrite rules from subdomain to root scripts crashed...