rewrite redirect on base folder only
Added by j j over 14 years ago
Hi,
after bashing google for a few good hrs im still stuck and wonder if you guys and girls can either point me in the right direction reguarding search terms or help me out by explaining that im missing.
heres what i want to do:
the first directory on a domain:
ie. http://example.com/folder1
i want to redirect to a page in another folder
fairly simple...
url.rewrite-once = (
"/folder1/" => "/folder2/index.php"
)
all working well, until i try and access a folder that isnt the base one, with the same name, i still get redirected.
ie..
http://example.com/test/folder1/
still goes to folder2.index.php
so my question is, is there a way to only do the first folder instance, ie base folder???
regex website explained how to split the string and google kept giving me domain forwarding, like https to http etc so still clueless :s
Many thanks in advance for any, and all help
J :)
Replies (2)
RE: rewrite redirect on base folder only
-
Added by Felix Schäfer over 14 years ago
Not sure what you are trying to achieve or what it has to do with redmine, but every regex language has a special character for the beginning of the string to ensure that there is nothing in front of your search string. As this looks like a lighttpd config, try ^ as the beginning of the string, i.e. "^/folder1/" should only match URI that start with /folder1/.
RE: rewrite redirect on base folder only
-
Added by j j over 14 years ago
:) wow thanks for the quick response, and it works :)
massive thanks :)
think i was having a blonde moment with the forums, lighttpd help section comes to redmine :s possibly cos they use the same forum.
anywho, many thanks again :)
J