exarhis Posted July 8, 2014 Share Posted July 8, 2014 (edited) Hi friends, I have to transform this url domain.com/main/folder1/folder2/folder3 to domain.com/get.php?var1=folder1&var2=folder2&var3=folder3 How can i do it with htaccess. Thank u Edited July 8, 2014 by exarhis Quote Link to comment https://forums.phpfreaks.com/topic/289560-mod_rewrite-folder-to-variable/ Share on other sites More sharing options...
Ch0cu3r Posted July 8, 2014 Share Posted July 8, 2014 Try RewriteEngine On RewriteCond %{REQUST_FILENAME} !-d RewriteCond %{REQUST_FILENAME} !-f RewriteRule ^main/([^/]+)/([^/]+)/([^/]+)/ get.php?var1=$1&var2=$2&var3=$3 [NC,L] Quote Link to comment https://forums.phpfreaks.com/topic/289560-mod_rewrite-folder-to-variable/#findComment-1484259 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.