General Topics > SEO
About Url rewrite
(1/1)
lecaocuong:
Hi,
I'm Vietnamese and english is bad. I have a question:
How can i rewrite: example.com/index.php?rt=content/sitemap to example.com/sitemap
Google webmaster error 404, and not good for SEO.
Thank for help!
kabirthapar:
To accomplish this, we need to first create a text document called ".htaccess" to contain our rules. It must be named exactly that (not ".htaccess.txt" or "rules.htaccess"). This would be placed in the root directory of the server (the same folder as "index.php?rt=content/sitemap" in your example). There may already be an .htaccess file there, in which case we should edit that rather than overwrite it.
The .htaccess file is a configuration file for the server. If there are errors in the file, the server will display an error message (usually with an error code of "500"). If you are transferring the file to the server using FTP, you must make sure it is transferred using the ASCII mode, rather than BINARY. We use this file to perform 2 simple tasks in this instance - first, to tell Apache to turn on the rewrite engine, and second, to tell apache what rewriting rule we want it to use. We need to add the following to the file:
RewriteEngine On # Turn on the rewriting engine
RewriteRule ^sitemap/?$ index.php?rt=content/sitemap [NC,L] # Handle requests for "sitemap"
llegrand:
.htaccess.txt is part of the core files in Abantecart, so no need to create. Just rename by removing the .txt.
Here are the docs on this
http://docs.abantecart.com/pages/settings/system.html
this is more information about enabling seo urls, which require the .htaccess to be changed
http://docs.abantecart.com/pages/tips/enable_seo.html
If you need further assistance, please post back.
Lee
Navigation
[0] Message Index
Go to full version