LamivNahdus Posted April 15, 2008 Share Posted April 15, 2008 Hello, I need help in url redirection.... I want all the directories accessed in 'redir' subdomain be redirected to specific three php scripts. Like this.... http://redir.domain.com/first to f.php?u=first http://redir.domain.com/first/sec to s.php?u=first&p=sec http://redir.domain.com/first/sec/third to t.php?u=first&p=sec&a=third f.php, s.php and t.php will be in the same directory as the redir subdomain. Now i need the .htaccess configuration file to be placed in redir subdomain directory. Please help me and provide me the correct configuration that have to be placed in .htaccess at subdomain directory... I dont know how to do this. Thank you in advance.... Quote Link to comment Share on other sites More sharing options...
discomatt Posted April 15, 2008 Share Posted April 15, 2008 If you want things done for you, check out the freelancing forums... If you want to learn yourself, check out this link http://www.yourhtmlsource.com/sitemanagement/urlrewriting.html Quote Link to comment Share on other sites More sharing options...
Northern Flame Posted April 15, 2008 Share Posted April 15, 2008 try: RewriteEngine on RewriteRule ^([^/\.]+)/?$ /f.php?u=$1 [L] RewriteRule ^([^/\.]+)/([^/\.]+)/?$ /s.php?u=$1&p=$2 [L] RewriteRule ^([^/\.]+)/([^/\.]+)/([^/\.]+)/?$ /t.php?u=$1&p=$2&a=$3 [L] Quote Link to comment Share on other sites More sharing options...
LamivNahdus Posted April 16, 2008 Author Share Posted April 16, 2008 Its working dude. Iam wondering this issue for many days. Coded a lot but nothing worked. Now you got it for me...! Thank you so much! Quote Link to comment Share on other sites More sharing options...
Northern Flame Posted April 16, 2008 Share Posted April 16, 2008 you're welcome, remember to put "Topic Solved" Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.