Page 1 of 1

Some mod_rewrite issues

Posted: Sat Jul 01, 2006 3:11 pm
by antubis
Hello to all.

I`m new to SEO and mod_rewrite stuff and I have some problems.
I want the following to happen

site.com/Admin -> site.com/admin.php
site.com/Admin/post -> site.com/admin.php?action=post
site.com/Admin/edit/id/3 -> site.com/admin.php?action=post&id=3

for last one I write the code below

Code: Select all

RewriteRule ^Admin/([A-Za-z0-9-]+)/([A-Za-z0-9-]+)/([0-9]+)/?$ admin.php?action=$1&$2=$3 [L]
It works fine.
But for the other two whatever I write the page break

Should I write a new RewriteRule for each one or I can do this with a single one?
Why when I reach site.com/Admin/edit/id/3/ the whole .css and .images disapeared and is there anyway to fix the problem without using full paths?

I`ll be very thankful if you tell me what is the right sintax for this.

Posted: Sat Jul 01, 2006 3:27 pm
by basdog22
Try this:

Code: Select all

RewriteRule ^Admin/([A-Za-z0-9]+)/([A-Za-z0-9]+)/([0-9]+)/?$ admin.php?action=$1&$2=$3 [L]

Posted: Sat Jul 01, 2006 3:55 pm
by antubis
I don`t see the diffrent between yours and mine code .. or I`m wrong?