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.... Link to comment https://forums.phpfreaks.com/topic/101150-solved-apache-url-rewrite-help/ 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 Link to comment https://forums.phpfreaks.com/topic/101150-solved-apache-url-rewrite-help/#findComment-517355 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] Link to comment https://forums.phpfreaks.com/topic/101150-solved-apache-url-rewrite-help/#findComment-517375 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! Link to comment https://forums.phpfreaks.com/topic/101150-solved-apache-url-rewrite-help/#findComment-518103 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" Link to comment https://forums.phpfreaks.com/topic/101150-solved-apache-url-rewrite-help/#findComment-518107 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.