Seperate external and intranet portals using the same functions .htaccess
Posted
by
jezzipin
on Server Fault
See other posts from Server Fault
or by jezzipin
Published on 2013-07-01T15:29:19Z
Indexed on
2013/07/01
16:22 UTC
Read the original article
Hit count: 228
We are currently struggling with setting up rules for a .htaccess file for a website built upon our company product. The product is built using PLSQL and procedures can be accessed using URLs. We use this functionality to present different options to our users.
These options can be injected into HTML pages using replacement tags. So, the tag [user_menu] is always replaced with:
/wd_portal_cand.menu?p_web_site_id={variable1}&p_candidate_id={variable2}
for external sites and
/intranet/wd_portal_cand.menu?p_web_site_id={variable1}&p_candidate_id={variable2}
for internal sites.
The issue we are having is twofold. We need to write our .htaccess rules so that the user can access the functionality whether they are internal or external. So, the links should work as follows:
http://www.example.com/wd_portal_cand.menu?p_web_site_id={variable1}&p_candidate_id={variable2}
or
http://www.example.com/internal/wd_portal_cand.menu?p_web_site_id={variable1}&p_candidate_id={variable2}
This is the other problem. As you can see for the internal link above, the procedure needs to be prefixed with internal instead or intranet. We cannot change this in our standard tags as this will affect other sites so we need to achieve this also using htaccess.
Could anyone assist with this issue? I apologise if this is brief or confusing but it's something i've never done before and have been given the task of doing.
I apologise for the lack of code that will be posted above however I am a front end developer and have been left to make these changes having no prior experience of .htaccess to please bare with me.
© Server Fault or respective owner