Mode Rewrite for Clean URL

A

Anonymous

Guest
Hi friends,

I have made a project with clean URL using mode_rewrite method.

I have write rewrite rules in htaccess like

Code:
RewriteEngine On
RewriteBase /mydir
RewriteRule ^filename/id/([0-9]+)/lang/([a-z]+).html$ filename.php?id=$1&lang=$2

my file contains link for css that is not rendered because css is located in mydir directory and i have given slashesh for url rewriting. I have tried lot. If I make my url separated by _ then it works nicely but I want slashes.
 
Here is a thumb rule!! :D
Whenever u use mod_rewrite...
Always use root paths for images, css, javascript files
so
Code:
<link rel="stylesheet" href="/mydir/style.css" type="text/css" />
instead of
Code:
<link rel="stylesheet" href="style.css" type="text/css" />
 
Hi Ruturaj ThanX

Now it works.
Hey I found other thing also. You just set it into your page that

Code:
<base href="your index page path">


ThanX a lot for help.
 
Back
Top