Click here to Skip to main content
15,886,963 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I try to apply url rewrite code for my web site, .htaccess file include bellow code, but it is not working and no errors also,can you suggest some solution for that?

my code

RewriteEngine On # Turn on the rewriting engine
RewriteRule ^products/([0-9]+)/?$ index.php?product_id=$1 [NC,L]



Thank you,
Posted

Perhaps mod_rewrite is not enabled.
"The mod_rewrite by default is disabled in Apache servers to prevent any chance of misuse. The module can, however, be switched on through certain commands listed in the httpd.conf file. This file can be found in a folder, which by default, is named ‘configuration’, or something similar."

http://www.serverschool.com/server-configuration/how-to-enable-mod_rewrite-in-apache-server/[^]

The problem may also be related to your operating system. If you are using Windows then this link may help.

http://www.snippetit.com/2008/04/enable-htaccess-and-url-rewriting-in-apache-http-server-for-windows/[^]
 
Share this answer
 
Thank you for replay ,

I have active that and other my .htaccess file for url rewrite working proper.
but this is not working

Harshitha
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900