oshopindia Posted August 28, 2013 Author Share Posted August 28, 2013 I also try This But I can't get Expected Results So please help me to know that Mod_rewrite enable or not on My Godaddy server Quote Link to comment https://forums.phpfreaks.com/topic/281230-mod_rewrite-not-working/page/2/#findComment-1447110 Share on other sites More sharing options...
jazzman1 Posted August 28, 2013 Share Posted August 28, 2013 To check that mod_rewrite is enabled to your domain (I'm pretty sure it is) , create .htaccess and display.php files inside web root or your current working directory. .htaccess RewriteEngine On RewriteRule ^.*$ display.php display.php <?php print 'mod_rewrite works fine!'; ?> Every request like (domainName/index.php) should be redirected to display.php file! Quote Link to comment https://forums.phpfreaks.com/topic/281230-mod_rewrite-not-working/page/2/#findComment-1447181 Share on other sites More sharing options...
oshopindia Posted August 30, 2013 Author Share Posted August 30, 2013 Through Your Method I can See That Mod_Rewrite Works fine on my Website Now I Want to convert http://www.grabkart.com/productdetail.php?prodid=9449 to http://www.grabkart.com/prodid/9449 Please Give Me RewriteRule for This Quote Link to comment https://forums.phpfreaks.com/topic/281230-mod_rewrite-not-working/page/2/#findComment-1447433 Share on other sites More sharing options...
jazzman1 Posted August 31, 2013 Share Posted August 31, 2013 No! Your application uses links like: http://www.grabkart.com/productdetail.php?prodid=9449 If you try to rewrite that link to "http://www.grabkart.com/prodid/9449" , this link won't be real for your app. Re-read my reply #25. Quote Link to comment https://forums.phpfreaks.com/topic/281230-mod_rewrite-not-working/page/2/#findComment-1447574 Share on other sites More sharing options...
oshopindia Posted September 2, 2013 Author Share Posted September 2, 2013 When I apply You reply #25 It shows : Not FoundThe requested URL /grabkkkart1/productdetail/4385 was not found on this server. Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request. Apache Server at www.grabkart.com Port 80 Quote Link to comment https://forums.phpfreaks.com/topic/281230-mod_rewrite-not-working/page/2/#findComment-1447789 Share on other sites More sharing options...
jazzman1 Posted September 2, 2013 Share Posted September 2, 2013 Wrong pattern! Re-read my reply #25 again! Quote Link to comment https://forums.phpfreaks.com/topic/281230-mod_rewrite-not-working/page/2/#findComment-1447795 Share on other sites More sharing options...
oshopindia Posted September 2, 2013 Author Share Posted September 2, 2013 What is Wrong Pattern I Also Change Link In my PHP Website <a href="./productdetail/<?=$row_prod['product_id']?>"> and i also write RewriteRule ^/?productdetail/([^/]+)/?$ productdetail.php?prodid=$1 [L] Quote Link to comment https://forums.phpfreaks.com/topic/281230-mod_rewrite-not-working/page/2/#findComment-1447801 Share on other sites More sharing options...
jazzman1 Posted September 2, 2013 Share Posted September 2, 2013 (edited) Well, it's still wrong No, the last backslash is optional. That one is correct. Edited September 2, 2013 by jazzman1 Quote Link to comment https://forums.phpfreaks.com/topic/281230-mod_rewrite-not-working/page/2/#findComment-1447804 Share on other sites More sharing options...
oshopindia Posted September 2, 2013 Author Share Posted September 2, 2013 (edited) So Please explain What to do Ya If It's correct Then Why i am not able to Rewrite My Url Edited September 2, 2013 by oshopindia Quote Link to comment https://forums.phpfreaks.com/topic/281230-mod_rewrite-not-working/page/2/#findComment-1447806 Share on other sites More sharing options...
jazzman1 Posted September 2, 2013 Share Posted September 2, 2013 The URL and the rewriting rule are correct. Make sure you get a correct result of your php script as well. Can I see the web structure of those files involved in this issue? Quote Link to comment https://forums.phpfreaks.com/topic/281230-mod_rewrite-not-working/page/2/#findComment-1447813 Share on other sites More sharing options...
oshopindia Posted September 2, 2013 Author Share Posted September 2, 2013 (edited) Ya When I Click On That Link It Redirect to http://www.grabkart.com/productdetail/9449 We Have Multiple hosting Facility in Our Godaddy Server My Website Grabkart.com is in grabkkkart folder But we also have Separate Ftp For my This site Here is my site's structure / index1.php productdetail.php index1.php and productdetail.php Both files are under One root / directory Edited September 2, 2013 by oshopindia Quote Link to comment https://forums.phpfreaks.com/topic/281230-mod_rewrite-not-working/page/2/#findComment-1447815 Share on other sites More sharing options...
oshopindia Posted September 2, 2013 Author Share Posted September 2, 2013 You can Open http://www.grabkart.com/index1.php And I write <a href="./productdetail/<?=$row_prod['product_id']?>"> on all images And i Write <a href="productdetail.php?prodid=<?=$row_prod['product_id']?>"> On all Product Links And I wrote # Do not remove this line, otherwise mod_rewrite rules will stop workingRewriteBase /Options +FollowSymLinksRewriteEngine onRewriteRule ^/productdetail/([^/]+)$ productdetail.php?prodid=$1 [L] on my.htaccess file Quote Link to comment https://forums.phpfreaks.com/topic/281230-mod_rewrite-not-working/page/2/#findComment-1447819 Share on other sites More sharing options...
jazzman1 Posted September 2, 2013 Share Posted September 2, 2013 No, the first backslash should be optional! Change: RewriteRule ^/productdetail/([^/]+)$ productdetail.php?prodid=$1 [L] TO RewriteRule ^/?productdetail/([^/]+)/?$ productdetail.php?prodid=$1 [L] Quote Link to comment https://forums.phpfreaks.com/topic/281230-mod_rewrite-not-working/page/2/#findComment-1447820 Share on other sites More sharing options...
oshopindia Posted September 3, 2013 Author Share Posted September 3, 2013 (edited) I also Try this but IT Can't Happened You Can See it in http://www.grabkart.com/index1.php Here is my .htaccess file # Do not remove this line, otherwise mod_rewrite rules will stop workingRewriteBase /Options +FollowSymLinksRewriteEngine onRewriteRule ^/?productdetail/([^/]+)/?$ productdetail.php?prodid=$1 [L] Edited September 3, 2013 by oshopindia Quote Link to comment https://forums.phpfreaks.com/topic/281230-mod_rewrite-not-working/page/2/#findComment-1447925 Share on other sites More sharing options...
jazzman1 Posted September 3, 2013 Share Posted September 3, 2013 Hire someone to solve the problem, obviously you're unable to fix it yourself and so lazy to read the articles which I sent you above. Quote Link to comment https://forums.phpfreaks.com/topic/281230-mod_rewrite-not-working/page/2/#findComment-1447953 Share on other sites More sharing options...
oshopindia Posted September 5, 2013 Author Share Posted September 5, 2013 Sir, I write RewriteRule ^product/([^_]*)$ /products.php?catid=$1 [L] on .htaccess file and it's Working but It Showing Pages Without Css I don't Know why? Is My Website's Syntex wrong Or What & What to Do For Fight With This situation Quote Link to comment https://forums.phpfreaks.com/topic/281230-mod_rewrite-not-working/page/2/#findComment-1448262 Share on other sites More sharing options...
oshopindia Posted September 5, 2013 Author Share Posted September 5, 2013 Sir, I write RewriteRule ^product/([^_]*)$ /products.php?catid=$1 [L] on .htaccess file and it's Working but It Showing Pages Without Css I don't Know why? Is My Website's Syntex wrong Or What & What to Do For Fight With This situation Quote Link to comment https://forums.phpfreaks.com/topic/281230-mod_rewrite-not-working/page/2/#findComment-1448281 Share on other sites More sharing options...
jazzman1 Posted September 7, 2013 Share Posted September 7, 2013 Use absolute paths to your stylesheets. Quote Link to comment https://forums.phpfreaks.com/topic/281230-mod_rewrite-not-working/page/2/#findComment-1448585 Share on other sites More sharing options...
oshopindia Posted September 12, 2013 Author Share Posted September 12, 2013 sir I used All css & js Files with absolute paths all css working but only one javascript file not working I write <script type="text/javascript" src="http://www.grabkart.com/js/lib/jquery.js" ></script> for this is it true or False Quote Link to comment https://forums.phpfreaks.com/topic/281230-mod_rewrite-not-working/page/2/#findComment-1449189 Share on other sites More sharing options...
oshopindia Posted September 12, 2013 Author Share Posted September 12, 2013 (edited) I have write some thing in js folder? Edited September 12, 2013 by oshopindia Quote Link to comment https://forums.phpfreaks.com/topic/281230-mod_rewrite-not-working/page/2/#findComment-1449192 Share on other sites More sharing options...
jazzman1 Posted September 16, 2013 Share Posted September 16, 2013 I think this topic thread should be lock. Quote Link to comment https://forums.phpfreaks.com/topic/281230-mod_rewrite-not-working/page/2/#findComment-1449625 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.