0

hello...i am using wamp server.
i donot know how to rewrite url. i dont have a bit of knowledge to use .htaccess.
please tell me how to write. first of all can we change any thing in apache2 folder which is server?
and next i was directly placed .htaccess.txt file in the root directory. but it is not working. any body plz help me how to do?

3
Contributors
3
Replies
4
Views
7 Years
Discussion Span
Last Post by muralikalpana
0

First see if mod rewrite is enabled in wamp.(just click on the wamp server icon, and enable this apache module)

0

i was rewrote urls in htaccess. all working fine in my localhost. but it is not working fine in server.here is my code.

RewriteEngine on
RewriteCond %{HTTP_HOST} ^www.xyz.com$
RewriteRule ^$ index.php [L]
RewriteRule ^index index.php [L]
RewriteRule ^aboutus  aboutus.php [L]
RewriteRule ^category/([a-zA-Z0-9_-]+[^.]+)$ cat_product.php?name=$1 [NC]
RewriteRule ^brands/([a-zA-Z0-9_-]+[^.]+)$ brand_product.php?bname=$1 [NC] 
RewriteRule ^carriers/([a-zA-Z0-9_-]+[^.]+)$ categories_name.php?cname=$1 [NC]                                
RewriteRule ^manufacturers/([a-zA-Z0-9_-]+[^.]+)$ categories_name.php?mname=$1 [L]
RewriteRule ^([^-]*)-([a-zA-Z0-9_-]+[^.]+)$ product_info.php?catname=$1&itemno=$2 [NC]

i wrote like this. it is working fine in localhost.
in server redirecting problem except index,aboutus pages. getting 404 error.

The requested URL /cells/cat_product.php was not found on this server.

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.