adrianTNT Posted February 25, 2009 Share Posted February 25, 2009 Hello, is it possible to do a db query and have the result affect the .htaccess? I want to redirect a domain only if that domain is set in database to redirect. I never seen this in .htaccess file and I dont know if it is possible. Htaccess would contain something like: // get variable from this x php file .. // if (...) then redirect Anyone has a simple sample for this?! Thank you. Link to comment https://forums.phpfreaks.com/topic/146913-htaccess-redirecting-a-domain-according-to-db-results/ Share on other sites More sharing options...
trq Posted February 26, 2009 Share Posted February 26, 2009 .htaccess is simply a configuration file. There isn't the available syntax for this, hence people end up using server side languages such as php for these types of tasks. Link to comment https://forums.phpfreaks.com/topic/146913-htaccess-redirecting-a-domain-according-to-db-results/#findComment-771571 Share on other sites More sharing options...
adrianTNT Posted February 26, 2009 Author Share Posted February 26, 2009 Maybe tge LA-U variable does this? %{LA-U:variable} can be used for look-aheads which perform an internal (URL-based) sub-request to determine the final value of variable. Link to comment https://forums.phpfreaks.com/topic/146913-htaccess-redirecting-a-domain-according-to-db-results/#findComment-771708 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.