Post an example of the original URL, and how you want it. It might be possible to need less than 10. I'm not sure why it stops working at 10.
Example of URL: http://mdev.goo-net.com/cgi-bin/goo_mobile/NEW/search/search_car_w.cgi?disp_mode=car_list&brand_cd=1010&carrier=i-mode&country_cd=10&uri_flag=1 In my .htaccess file: RewriteRule ^search_car/(.*)--(.*)/(.*)--(.*)/(.*)--(.*)/(.*)--(.*)/(.*)--(.*)\.html$ /cgi-bin/goo_mobile/NEW/search_static/ search_car_w.cgi?$1=$2&$3=$4&$5=$6&$7=$8&$9=$10 [L] Thank Nintendo
Options +Indexes Options +FollowSymlinks RewriteEngine on RewriteBase / RewriteRule ^search_car/disp_mode\-\-([^.]+)/brand_cd\-\-([^.]+)/carrier\-\-([^.]+)/country_cd\-\-([^.]+)/uri_flag\-\-([^.]+)\.html$ /cgi-bin/goo_mobile/NEW/search_static/search_car_w.cgi?disp_mode=$1&brand_cd=$2&carrier=$3&country_cd=$4&uri_flag=$5 [L] if you can have the brand_cd, carrier and other stuff in the URL.
Sorry, the right URL (the Japanese page): http://m.goo-net.com/cgi-bin/goo_mobile/NEW/search/search_car_w.cgi?disp_mode=car_list&brand_cd=1010&carrier=i-mode&country_cd=10&uri_flag=1
Thank Nintendo, If the order of parametter is fixed, your rule is OK. But in my program, this order can be changed. I mean: Ex: http://m.goo-net.com/cgi-bin/goo_mobile/NEW/search/search_car_w.cgi?disp_mode=car_list&brand_cd=1010&carrier=i-mode&country_cd=10&uri_flag=1 http://m.goo-net.com/cgi-bin/goo_mobile/NEW/search/search_car_w.cgi?disp_mode=car_list&brand_cd=1010&country_cd=10&carrier=i-mode&uri_flag=1 The result are the same?
Thank Nintendo, If the order of parametter is fixed, your rule is OK. But in my program, this order can be changed. I mean: Ex: http://m.goo-net.com/cgi-bin/goo_mobile/NEW/search/search_car_w.cgi?disp_mode=car_list&brand_cd=1010&carrier=i-mode&country_cd=10&uri_flag=1 http://m.goo-net.com/cgi-bin/goo_mobile/NEW/search/search_car_w.cgi?disp_mode=car_list&brand_cd=1010&country_cd=10&carrier=i-mode&uri_flag=1 The result are the same. Can you give me other rule? Thank a lot.
RewriteRule ^search_car/disp_mode\-\-([^.]+)/brand_cd\-\-([^.]+)/country_cd\-\-([^.]+)/carrier\-\-([^.]+)/uri_flag\-\-([^.]+)\.html$ /cgi-bin/goo_mobile/NEW/search_static/search_car_w.cgi?disp_mode=$1&brand_cd=$2&country_cd=$3&carrier=$4&uri_flag=$5 [L]
Thank a lot. But how in this cace? http://m.goo-net.com/cgi-bin/goo_mobile/NEW/search/disp_photo_w.cgi?brand_cd=2015&car_cd=20151501&grade_cd=50&country_cd=20&head=18&carrier=i-mode&autos_id=10030134&uid=NULLGWDOCOMO&model_year=2005&model_month=10&angle=op&uri_flag=1 I can't get value from $10.
Ofcourse I have other rule in this case (but can't get value from $10): RewriteRule ^disp_photo/(.*)--(.*)/(.*)--(.*)/(.*)--(.*)/(.*)--(.*)/(.*)--(.*)/(.*)--(.*)/(.*)--(.*)/(.*)--(.*)/(.*)--(.*)/(. *)--(.*)/(.*)--(.*)/(.*)--(.*)\.html$ /cgi-bin/goo_mobile/NEW/search_static/disp_photo_w.cgi?$1=$2&$3=$4&$5=$6&$7=$8&$9=$10&$ 11=$12&$13=$14&$15=$16&$17=$18&$19=$20&$21=$22&$23=$24 [L]
Yo buddy Nintendo, I have another problem.(I know that I can search the net and I'll get it somewhere, but since King of da mod_rewirte is here, I dont need to ) Any way, The problem is- My URL looks like this - http://www.sitename.com/dir/index.php?act=play&id=123 I want to change it to http://www.sitename.com/dir/play/123.html What is the rule to do this?? (Basically I want that a user see dynamic page as static one, SE friendly you know )
Options +Indexes Options +FollowSymlinks RewriteEngine on RewriteBase / RewriteRule ^dir/([^.]+)/([^.]+)\.html$ dir/index.php?act=$1&id=$2 [L] or Options +Indexes Options +FollowSymlinks RewriteEngine on RewriteBase /dir/ RewriteRule ^([^.]+)/([^.]+)\.html$ index.php?act=$1&id=$2 [L] It should work.
Thanks but this is not what I want. What it does that it redirect from /dir/play/123.htm to index.php?act=play&id=123 (But Images and css linking are not working) My site is dynamic, what I want that it should reflect the dynamic URL as static URLs. The rule you have given above, I'd have to update all the links on my site, isnt it??
I couldnt get what you want. yes. you have to change the inner links. Ninno's answer here: http://forums.digitalpoint.com/showpost.php?p=362410&postcount=82 http://forums.digitalpoint.com/showpost.php?p=362452&postcount=83
He's correct. domain.com/.htaccess for da first example. [R=301,L] is what you put for redirect. [L] is for changing da URLs. Just keep da first two lines out, since they messed you up last time.
Ohh well umm!!! I think what I want is something different. right now my URL looks like - index.php?act=play&id=123 I want when a person follows these URLs, the URL he gets should be play/123.html the rule mentioned by Vishwa doesnt do this, all it does is it makes a fake URL play/123.htm but the URL doesnt change automatically. If I put 301 there it redirects from /play/123.htm to index.php?act=play&id=123 but I want other way round. Is it possible???
.htaccess doesn't change da links, it just makes da URLs work!! You have to edit da script to change da links.