2013-10-05 100 views
0

该网站是在子文件夹:Magento的URL重写和SEO

www.example.com/sub-folder/index.php/webpage.html 

如何隐藏/sub-folder/index.php/使显示的URL www.example.com/webpage.html?隐藏它是否会影响SEO?

+0

是在Apache上运行您的网站?然后.htaccess重写可以做到这一点。 –

回答

0

从技术上讲,没有/子文件夹/是理想的选择,但如果您在子文件夹目录下拥有子文件夹,则只要您关注您商店中的其他页面因素,就没有多大关系。 为什么不将网站移动到根目录?

0

如果在/ shop或目录下安装了magento,则将以下规则添加到“/home/username/public_html/shop/.htaccess”文件中。

<IfModule mod_rewrite.c>RewriteEngine On 
RewriteBase /shop/RewriteRule ^index\.php$ - [L] 
RewriteCond %{REQUEST_FILENAME} !-f 
RewriteCond %{REQUEST_FILENAME} !-d 
RewriteRule . /shop/index.php [L]</IfModule> 

检查此链接http://roshanlal.in/magento/how-to-remove-index-php-in-url-with-magento/

希望这将帮助你