Hello, I want to know experts opinion about whether its good to remove the file extension from the URL? lets say i have a php page mysite.com/a.php I want to remove ".php" I know its possible with htacces, my question is will that help in SEO? Regards- Pathan
Yes, you can rewrite file extensions using a few lines of coding in your .htaccess file. Be sure to read the mod_rewrite FAQ and these .htaccess tips and tricks and also make certain that your website is hosted on an Apache server with mod_rewrite enabled. However, from an SEO point of view it is not worth the time and effort you put into it unless you have a large website with various directories and subdirectories.
Thanks for your reply, well I have tested it on my server yeah its working as I am having Linux server, and regarding the SEO point of view I m thinking to use it on my new websites as I know its really hard to edit my existing sites pages.
Yes. .htaccess affects its own directory and further subdirectories. so u can make the .htaccess file to affect a few directories only
ahan thats really cool, will give that a try for sure, between I still want to know about is this effective in term of SEO?
This works for a person that asked the same question. http://www.webmasterworld.com/apache/3371997.htm RewriteEngine on # ## Internally rewrite extensionless file requests to .php files ## # # If the requested URI does not contain a period in the final path-part RewriteCond %{REQUEST_URI} !(\.[^./]+)$ # and if it does not exist as a directory RewriteCond %{REQUEST_FILENAME} !-d # and if it does not exist as a file RewriteCond %{REQUEST_FILENAME} !-f # then add .html to get the actual filename RewriteRule (.*) /$1.php [L] Code (markup):
extensions don't make any difference but its good to remove them so in the future, if you even move the platform, you can avoid lot of trouble