Jump to content

rishibala143

Members
  • Posts

    14
  • Joined

  • Last visited

    Never

Everything posted by rishibala143

  1. Hi I am using this .htaccess code for my project. This is working correctly. I am very new in to this. I got some reference from websites and developed this .htaccess code. I have seen in some sites, they use only very minimal code for seo friendly url. But mine looks very long. Is there any way to reduce this code. Kindly help me by giving me some examples. I surfed in web, but i didn't get what i want. Kindly help !!! #set link auto on Options +FollowSymLinks -MultiViews DirectoryIndex index.php DirectoryIndex index.html Options -Indexes RewriteEngine on RewriteBase / RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /index\.php\ HTTP/ RewriteRule ^index\.php$ http://www.yourdomain.com/ [R=301,L] RewriteCond %{HTTP_HOST} !^(.*)\.yourdomain\.com$ [NC] RewriteRule ^(.*)$ http://www.yourdomain.com/$1 [R=301,L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_URI} !(\.[a-zA-Z0-9]{1,5}|/)$ RewriteRule (.*)$ http://www.yourdomain.com/$1/ [R=301,L] RewriteRule ^about-us/$ about-us.php [L] RewriteRule ^customer-services/$ customer-services.php [L] RewriteRule ^contact-us/$ contact-us.php [L] RewriteRule ^terms-conditions/$ terms-conditions.php [L] RewriteRule ^privacy-policy/$ privacy-policy.php [L] RewriteRule ^brands/$ brands.php [L] RewriteRule ^products/$ products.php [L] RewriteRule ^shopping-cart/$ cart.php [L] RewriteRule ^new-products/$ products.php [L] RewriteRule ^popular-products/$ popular-products.php [L] RewriteRule ^best-deals/$ best-deals.php [L] RewriteRule ^product-search/$ product-search.php [L] RewriteRule ^product-advanced-search/$ asearch.php [L] RewriteRule ^keyword-search/$ keyword-search.php [L] RewriteRule ^advanced-search/$ advancedsearch.php [L] RewriteRule ^register/$ register.php [L] RewriteRule ^login/$ login.php [L] RewriteRule ^reseller/$ reseller.php [L] RewriteRule ^logout/$ logout.php [L] RewriteRule ^forgot-password/$ forgot-password.php [L] RewriteRule ^my-account/$ myaccount.php [L] RewriteRule ^my-profile/$ myprofile.php [L] RewriteRule ^change-password/$ changepassword.php [L] RewriteRule ^wishlist/$ wishlist.php [L] RewriteRule ^pro-order/$ pro-order.php [L] RewriteRule ^col-order/$ col-order.php [L] RewriteRule ^can-order/$ can-order.php [L] RewriteRule ^dis-order/$ dis-order.php [L] RewriteRule ^imageviewer/([^/]*)\/$ imageviewer.php?pid=$1 [L] RewriteRule ^products/([^/]*)/([^/]*)\/$ main-category.php?ml_id=$1&ml_name=$2 [L] RewriteRule ^products/([^/]*)/([^/]*)/([^/]*)/([^/]*)/([^/]*)\/$ main-category.php?ml_id=$1&ml_name=$2&sortby=$3&ordby=$4&page=$5 [L] RewriteRule ^products/([^/]*)/([^/]*)/([^/]*)/([^/]*)\/$ sub-category.php?ml_id=$1&ml_name=$2&sl_id=$3&sl_name=$4 [L] RewriteRule ^products/([^/]*)/([^/]*)/([^/]*)/([^/]*)/([^/]*)/([^/]*)/([^/]*)\/$ sub-category.php?ml_id=$1&ml_name=$2&sl_id=$3&sl_name=$4&sortby=$5&ordby=$6&page=$7 [L] RewriteRule ^products/([^/]*)/([^/]*)/([^/]*)/([^/]*)/([^/]*)/([^/]*)\/$ sub-sub-category.php?ml_id=$1&ml_name=$2&sl_id=$3&sl_name=$4&ssl_id=$5&ssl_name=$6 [L] RewriteRule ^products/([^/]*)/([^/]*)/([^/]*)/([^/]*)/([^/]*)/([^/]*)/([^/]*)/([^/]*)/([^/]*)\/$ sub-sub-category.php?ml_id=$1&ml_name=$2&sl_id=$3&sl_name=$4&ssl_id=$5&ssl_name=$6&sortby=$7&ordby=$8&page=$9 [L] RewriteRule ^products/([^/]*)/([^/]*)/([^/]*)\/$ products.php?sortby=$1&ordby=$2&page=$3 [L] RewriteRule ^new-products/([^/]*)/([^/]*)/([^/]*)\/$ products.php?sortby=$1&ordby=$2&page=$3 [L] RewriteRule ^popular-products/([^/]*)/([^/]*)/([^/]*)\/$ popular-products.php?sortby=$1&ordby=$2&page=$3 [L] RewriteRule ^best-deals/([^/]*)/([^/]*)/([^/]*)\/$ best-deals.php?sortby=$1&ordby=$2&page=$3 [L] RewriteRule ^product-search/([^/]*)/([^/]*)/([^/]*)/([^/]*)/([^/]*)/([^/]*)\/$ product-search.php?sea_mlid=$1&sea_slid=$2&sea_sslid=$3&sea_brandid=$4&sea_min_price=$5&sea_max_price=$6 [L] RewriteRule ^product-search/([^/]*)/([^/]*)/([^/]*)/([^/]*)/([^/]*)/([^/]*)/([^/]*)/([^/]*)/([^/]*)\/$ product-search.php?sea_mlid=$1&sea_slid=$2&sea_sslid=$3&sea_brandid=$4&sea_min_price=$5&sea_max_price=$6&sortby=$7&ordby=$8&page=$9 [L] RewriteRule ^keyword-search/([^/]*)/([^/]*)/([^/]*)/([^/]*)\/$ keyword-search.php?txtsearch=$1&sortby=$2&ordby=$3&page=$4 [L] RewriteRule ^wishlist/([^/]*)/([^/]*)\/$ wishlist.php?action=$1&page=$2 [L] #RewriteRule ^product-advanced-search/([^/]*)/([^/]*)/([^/]*)/([^/]*)/([^/]*)/([^/]*)/([^/]*)/([^/]*)/([^/]*)/([^/]*)/([^/]*)\/$ asearch.php?smlid=$1&sslid=$2&sgenid=$3&sbrandid=$4&sstyid=$5&sheelid=$6&smatid=$7&searchprice=$8&sortby=$9&ordby=$10&page=$11 [L] RewriteRule ^product-details/([^/]*)/([^/]*)\/$ main-product.php?prod_id=$1&prod_name=$2 [L] RewriteRule ^login/([^/]*)\/$ login.php?msg=$1 [L] RewriteRule ^reseller/([^/]*)\/$ reseller.php?res_msg=$1 [L] RewriteRule ^brands/([^/]*)/([^/]*)\/$ brands.php?baction=$1&page=$2 [L] RewriteRule ^processing/([^/]*)/([^/]*)\/$ pro-order.php?porder=$1&page=$2 [L] RewriteRule ^collected/([^/]*)/([^/]*)\/$ col-order.php?corder=$1&page=$2 [L] RewriteRule ^dispatched/([^/]*)/([^/]*)\/$ dis-order.php?dorder=$1&page=$2 [L] RewriteRule ^cancelled/([^/]*)/([^/]*)\/$ can-order.php?canorder=$1&page=$2 [L] RewriteRule ^order-details/([^/]*)\/$ orderview.php?ord_id=$1 [L] #set link start http://www.yourdomain.com Regards P.Balakrishnan.
  2. Yes you are correct. The Problem is solved. Thanks for your help :) Regards P.Balakrishnan
  3. Hi I am developing a e-commerce website. The user logs in and buy a product when he checkout the page will redirect to the payment gateway. After the payment is completed it will return back to my website. This is ok. But when it is returning back the session maintained in my website get lost. This happen only for the first time. If the user again logged in and checkout the process works good and the session is maintaining. Why does the session lost for first time. I used session_start() in all the pages.. I cannot find the solutions. Kindly help.. Regards P.Balakrishnan
  4. Hi I am new to mod_rewrite I need two things to do in htacess 1. I want all my php pages to display as html Example : index.php to index.html aboutus.php to aboutus.html I given like this Options +FollowSymLinks RewriteEngine on RewriteRule ^([^/]*)\.html$ index.php?action=$1 RewriteRule ^([^/]*)\.html$ aboutus.php?action=$1 This works good. But for this a query string is passes. I don’t want to give any query string. If I click index.php it should redirect to index.html. I don’t want to write separate for aboutus.php. within a single code it should redirect all php to html pages 2. The most wanted thing I want to search a thing using city name in my project For example If I click the cityname eg.chennai The following url will be like this : www.domainname.com/search.php?city=chennai But I want like this http://chennai.domainname.com if I click Mumbai it should be http://mumbai.domainname.com How to do this ? I want like this site http://www.clickindia.com/ http://www.indialist.com There if we click the city name it will redirect the url as cityname.domainname.com Please help
  5. Hi I am new to php. I gone through Mod_Rewrite, everything works good but i have a doubt. By clicking the hyperlink the url is not changing My Original Url http://www.somesite.com/widgets.php?colour=blue After Mod-rewrite http://www.somesite.com/widgets/blue/ If i copy this and paste in address bar it works good. <a href="http://www.somesite.com/widgets.php?colour=blue">click here</a> But when i click this link : ( http://www.somesite.com/widgets.php?colour=blue ) this link only shown in the address bar. But i want this ( http://www.somesite.com/widgets/blue/) link to be shown in address bar. Should i want to change all the hyperlink to seo friendly or it will be automatically converted ? Please help !!!
  6. Hi I am developing a project for online movie ticket booking. My client requirement is that they have to issue tickets in counter and users can also book tickets through online. The counter machine dont have any net connection they are attached to one server and the server is connected with net. I dont have any idea where can i maintain the database. The user can book tickets If they shutdown the local server also. Is there any possible to synchronize the local database with online database. Please give some ideas...
  7. Hi I got the solution...Thank u for ur support... Code: --------- <? print_r(probableOutcomes(4)); function probableOutcomes($num) { $resultArray = array(); for ($i = 0; $i < $num; $i++) { $binaryString .= "1"; } for ($i = 0; $i <= bindec($binaryString); $i++) { $resultString = str_pad(decbin($i), $num, "0", STR_PAD_LEFT); $resultString = str_replace("0", "W", $resultString); $resultString = str_replace("1", "L", $resultString); array_push($resultArray, $resultString); } return $resultArray; } ?> --------- The above example outputs Code: --------- Array ( [0] => WWWW [1] => WWWL [2] => WWLW [3] => WWLL [4] => WLWW [5] => WLWL [6] => WLLW [7] => WLLL [8] => LWWW [9] => LWWL [10] => LWLW [11] => LWLL [12] => LLWW [13] => LLWL [14] => LLLW [15] => LLLL ) This works for me.. Regards P.Balakrishnan
  8. Hi I need to generate probability for win and loss in round...If there are 2 rounds the probability will be W-W W-L L-W L-L and if there are three rounds i want to generate the probability dyanamically..I need this for the below query SELECT team_id, GROUP_CONCAT( play_result, round_no ORDER BY round_no SEPARATOR '-' ) AS team_res, SUM( play_total ) AS total FROM tbl_play GROUP BY team_id HAVING team_res = 'W1-W2' || team_res = 'W1-L2' || team_res = 'L1-W2' || team_res = 'L1-L2' ORDER BY total DESC In this above query the win and loss is hardcoded for two rounds...If there is 3 round i have to write like this SELECT team_id, GROUP_CONCAT( play_result, round_no ORDER BY round_no SEPARATOR '-' ) AS team_res, SUM( play_total ) AS total FROM tbl_play GROUP BY team_id HAVING team_res = 'W1-W2-W3' || team_res = 'W1-W2-L3' || team_res = 'W1-L2-W3' etc... So only i need to generate the probability of given number(i.e round number.) Please help
  9. Hi I need to display the probability for the given number. Suppose if the given number is 2. It should display (W - Win and L - Loss) W - W W - L L - W L - L It should generate the probability dynamically for the given number.I dont know how to do this using php.. Please help...Its Urgent... Thanks & Regards P.Balakrishnan
  10. Hi SELECT team_id, GROUP_CONCAT( play_result, round_no ORDER BY round_no SEPARATOR '-' ) AS team_res, SUM( play_total ) AS total FROM tbl_play GROUP BY team_id HAVING team_res = 'W1-W2' || team_res = 'W1-L2' || team_res = 'L1-W2' || team_res = 'L1-L2' ORDER BY total DESC In this above query the win and loss is hardcoded for two rounds...If there is 3 round i have to write like this SELECT team_id, GROUP_CONCAT( play_result, round_no ORDER BY round_no SEPARATOR '-' ) AS team_res, SUM( play_total ) AS total FROM tbl_play GROUP BY team_id HAVING team_res = 'W1-W2-W3' || team_res = 'W1-W2-L3' || team_res = 'W1-L2-W3' etc... So only i need to generate the probability of given number(i.e round number.) Please help
  11. Hi I need to display the probability for the given number. Suppose if the given number is 2. It should display H-H H-L L-H L-L It should generate the probability dynamically for the given number.I dont know how to do this using php.. Please help...Its Urgent... Thanks & Regards P.Balakrishnan
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.