NEED HELP On Rewrite

Discuss practical ways rearrange URLs using mod_rewrite.

NEED HELP On Rewrite

Postby computergeek » Mon Mar 06, 2006 2:11 pm

OK I have this so far but it doesn't really work with my functions calling $_GET['id'] all that well

Options +FollowSymLinks
RewriteEngine on

RewriteCond %{THE_REQUEST} ^GET
RewriteRule ^([A-Za-z0-9-]+)/?$ index.php?id=$1 [L]

RewriteCond %{THE_REQUEST} ^GET
RewriteRule ^([A-Za-z0-9-]+)/([A-Za-z0-9-]+)/?$ index.php?id=$1&sub=$2 [L]

now, what i want it to do, is for each query string (2 Deep) replace with the friendly url which it does, but for some reason when i type www.domain.com/articles/ it shows blank because it is getting an error which it will not show on screen unless i type in the query string ?id-articles and this error is telling me i cannot redefine a function. EVEN though i do not redefine a function. by adding the GET i have eliminated the error when using a querystring but it still goes blank whin i use the rewrite links.

Also i want to take URI admin/ and make it redirect to admin/index.php.

Anyone know how i need to write my rewrites and conditions if any???
I have been struggling with this for a week now!
thanks in advance!
-vin
computergeek
 
Posts: 1
Joined: Mon Mar 06, 2006 2:03 pm

Return to Friendly URLs with Mod_Rewrite

Who is online

Users browsing this forum: No registered users and 29 guests

cron