Wordpress Seo features
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 /shopboxc开发者_运维问答ms/
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?
I got the answer:
<IfModule mod_rewrite.c>
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
</IfModule>
精彩评论