views:

29

answers:

1

I am working with wordpress in apache.Now am in very big trouble.I need to rewrite my url. I am trying by this code for .htaccess file

<IfModule mod_rewrite.c>
RewriteEngine On

RewriteBase /shopboxcms/

RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d [OR]
RewriteCond %{REQUEST_FILENAME} gallery\_remote2\.php
RewriteCond %{REQUEST_FILENAME} !main\.php
RewriteRule . - [L]
RewriteRule ^wp-admin\/widgets111\.html$ /wordpress/wp-admin/widgets.php
RewriteRule ^hai$ http://localhost/shopboxcms/index.php?productid=62953
</IfModule>

But by using this .htaccess file when we try to call http://localhost/shopboxcms/hai which shows http://localhost/shopboxcms/?productid=62953 but I need the reverse. How can I solve it?

A: 

Thanks for going through my problem.Finally i got the answer...here i am sharing...

RewriteEngine On

RewriteBase /

RewriteCond %{REQUEST_FILENAME} -f [OR] RewriteCond %{REQUEST_FILENAME} -d [OR] RewriteCond %{REQUEST_FILENAME} gallery_remote2.php RewriteCond %{REQUEST_FILENAME} !main.php RewriteRule . - [L] RewriteRule ^[A-Za-z-0-9,"'-]+-([0-9]+)$ demo/index.php?productid=$1

Ajith