Jump to content

Multiple URL / File ReWrite


deadsilent

Recommended Posts

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.

Link to comment
https://forums.phpfreaks.com/topic/146539-multiple-url-file-rewrite/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.