deadsilent Posted February 23, 2009 Share Posted February 23, 2009 I have a similar question on the same matter. I'm wonder how I can use multiple RewriteRules for different files.. currently I am only able to Rewrite one and if I use any more they either dont work or will cause an error.. here is the code I'm using: <IfModule mod_rewrite.c> Options +FollowSymlinks RewriteEngine on RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ link.php?get=$1 [L,QSA] </IfModule> I'd like to add the code below for basic actions: RewriteRule ^(.*)$ index.php?do=$1 [L,QSA] then i'd like to have this one RewriteRule ^(.*)$ index.php?do=$1&search=$2&type=$3&page=$4 [L,QSA] which turns out like: /search/$2 If you could give me some help as well that would be great.. I'm starting to learn this stuff but I still dont get it.. :\ Thanks guys. Quote Link to comment https://forums.phpfreaks.com/topic/146539-multiple-url-file-rewrite/ Share on other sites More sharing options...
corbin Posted February 24, 2009 Share Posted February 24, 2009 You can't rewrite *everything* to 3 different URLs.... You will need some kind of system to know what page is desired. Perhaps something like: RewriteRule ^some_folder/(.*) /some_page.php?var=$1 (With stuff that makes sense put in, obviously.) Quote Link to comment https://forums.phpfreaks.com/topic/146539-multiple-url-file-rewrite/#findComment-769728 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.