Forum Moderators: phranque

Message Too Old, No Replies

.htaccess problem

         

swatej

10:24 am on Nov 20, 2007 (gmt 0)

10+ Year Member



Hi,

I am facing problem in .htaccess file. I have written following htaccess rule but it is not giving proper result.

# A."tag/$TAG/$CITY/$STATE/$mode-$searchMiles-$showRecords-3-$noofrecords-$condcatid/pageno"
RewriteCond %{REQUEST_URI} ^/tag/(.*)/([A-Za-z-]+)/([A-Za-z]+)/(.*)-([0-9]+)-([0-9]+)-([0-9])-([0-9]+)-([0-9]+)/page([0-9]+) [NC]
RewriteRule ^(.*)$?mysession=YnVzaW5lc3NfU2VhcmNoVGFncw==&buslocation=%2,%3&tag=%1&mode=%4&searchMiles=%5&
sortBy=%7&showRecords=%6&condcatid=%9&noofRecords=%8&pos=%10

If my url is:

http://192.168.0.53/mojopages/tag/dentists/fullerton/ca/searchByMiles-25-25-1-59-1012/page2

When i print the value pos in calling page it shows me "dentist0".
I think it takes value of %1 and append 0 to that value.

Can you give me suggestion how can i form this url? I have many parameters like %12 and %13 in some other urls.

I am eagerly waiting for reply...

Thank you in advance...

-Swatej

[edited by: jdMorgan at 3:49 pm (utc) on Nov. 20, 2007]
[edit reason] Fixed horizontal scroll & de-linked [/edit]

phranque

1:45 pm on Nov 20, 2007 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



RewriteCond backreferences of the form %N only work for (1 <= N <= 9).

i can't think of a good way to get around this limitation - maybe rewrite the url in multiple stages...