Forum Moderators: phranque

Message Too Old, No Replies

Url Masking

         

thriller aus

11:34 am on Jan 2, 2007 (gmt 0)

10+ Year Member



hi

my site is displaying url like this way

[myvouchercodes.co.uk...]

but i need it should display only without 4 and 244

[myvouchercodes.co.uk...]

MY actual code page is having 3 query strings.

Options +FollowSymLinks
RewriteEngine on
RewriteRule (.*)/(.*)/(.*) voucher-codes.php?cat_name=$1&code_id=$2&retailer=$3

suppose if i am remove 2 and 3 (.*) it display a mysql query error.
for example i was changed my .htaccess code...

Options +FollowSymLinks
RewriteEngine on
RewriteRule (.*) voucher-codes.php?cat_name=$1&code_id=$2&retailer=$3

it is given me a error thats a mysql query string error.

Regards
Saju

jdMorgan

3:21 pm on Jan 2, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



mod_rewrite cannot create information from nothing. All information needed to display a product page must be present in the URL.

If you remove the 4/244 information from your URL, then MySQL has no way to know what "codeid" or "retailer" you wish to look up. You could make your site work without the 4/244, but then you could never display different codeid or retailer information pages. You would only be able to display category pages.

So what you are trying to do is probably not possible.

Jim

thriller aus

4:45 pm on Jan 2, 2007 (gmt 0)

10+ Year Member



yes exactly you are true (: this site was belongs to my client and i was thought of that same which you has written..

(: