2010-03-04 62 views
0

我正在使用WordPress中的apache.Now我在非常大的麻煩。我需要重寫我的網址。 我通過這個代碼.htaccess文件Wordpress Seo功能

<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> 

但是,通過使用這個.htaccess文件試圖當我們試圖調用http://localhost/shopboxcms/hai這表明http://localhost/shopboxcms/?productid=62953,但我需要相反。我該如何解決它?

回答

0

我得到了答案:

<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>