January 19, 20188 yr Is it good to use page extensions in the URL such as .HTML .PHP Are there any Pros and Cons using/not using page extensions?
January 22, 20188 yr Page extensions in the old way of thinking used to hold some value, it's why so many used to rewrite and serve php pages via an .html extension, essentially creating a physical page to the search engines even though it was dynamically generated. Now, the extension on the page is pretty much irrelevant imo, with search engines really only concerning themselves with urls and headers for html pages. For me I choose to drop them all together, simply down to url management and scope for changes without needing a bunch of 301 redirects. For example if I made /contact.html then it would get indexed, then I want a form so I make /contact.php and 301 the old page in. Oh, but now I want to swap to Windows and use aspx; so I make /contact.aspx and forward /contact.php there. All this would have been saved if I used /contact from the beginning, never needing to 301 ever again. Just my 2 pence worth as always
January 22, 20188 yr Author I have now removed .HTML and .PHP from showing in the URL. The method I used to do this was editing the .htaccess file and inserting the following: # Remove .php file extension from URL RewriteEngine on RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME}\.php -f RewriteRule ^(.*)$ $1.php [NC,L] # Remove .html file extension from URL RewriteEngine on RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME}\.html -f RewriteRule ^(.*)$ $1.html [NC,L]
April 2, 20188 yr Last week, Google released this video: It supports @BrowserBugs post - they don't care, at least in terms of it affecting search results.
Create an account or sign in to comment