rewriterule problem?

Discuss practical ways rearrange URLs using mod_rewrite.

rewriterule problem?

Postby serpito » Mon May 26, 2008 6:46 am

Options +FollowSymlinks
RewriteEngine on
RewriteRule ^myCategory/?harf=(.*)&page=(.*) index.php?sayfa=myCategory&harf=$1&page=$2 [NC]

I ve ruled this .htacces ,

with my PHP codes, I could acces the $_get['sayfa'] but not others;

how can I acces the $_GET['harf'] and $_GET['page'] variables?

or is there any easy way to do my point by using rewriterule?

pls help me....
serpito
 
Posts: 3
Joined: Sat Nov 03, 2007 5:14 am

Postby richardk » Wed May 28, 2008 2:15 pm

You can pass the parameters on with the QSA (Query String Append) flag
Code: Select all
Options +FollowSymLinks

RewriteEngine On

RewriteRule ^mycategory/?$ /index.php?sayfa=myCategory [NC,QSA,L]
richardk
 
Posts: 8800
Joined: Wed Dec 21, 2005 7:50 am


Return to Friendly URLs with Mod_Rewrite

Who is online

Users browsing this forum: No registered users and 98 guests

cron