Hey DP experts. I want to know that how to remove index.html from URL. E.g: I want to redirect url like www.domain.com/index.html to simple www.domain.com/ how to redirect it without any issue. I heard it can be possible through .htaccess file. But i dont know how to used and implement it to website. Can you guys help me.
Change the link that goes to your homepage tpo the website address. You may have: <a href="index.html">Link Here</a> Code (markup): Change that to: <a href="http://www.domain.com">Link</a> Code (markup):
Hey if do it and rename my index.html to my domain.com. Will it effects on SEO of my website or effect on SERP ?? Is it safe side in SEO purpose ?
You are not really renaming the index.html file, all you are doing is changing the link to your website address. This shouldn't the affect SEO or your SERP.
Hmm. I had also heard about .htaccess file. Do you know how to redirect URL from that file ? and how to implement it.
I see try using this piece of code Options +FollowSymLinks RewriteEngine on # index.php to / RewriteCond %{THE_REQUEST} ^[A-Z]{3, 9}\ /.*index\.php\ HTTP/ RewriteRule ^(.*)index\.php$ /$1 [R=301,L] Code (markup): Place this in to the .htaccess file and place the .htaccess file in your root directory (where index.html is)
Thats all ? I dont need to do any thing else? Only paste this code in .htaccess file and my work done? Then my URL will not show index.html? are you sure?
Hey man i hv upload the file. But getting this error.. Internal Server Error The server encountered an internal error or misconfiguration and was unable to complete your request. Please contact the server administrator, and inform them of the time the error occurred, and anything you might have done that may have caused the error. More information about this error may be available in the server error log. Additionally, a 500 Internal Server Error error was encountered while trying to use an ErrorDocument to handle the request.
I am sorry I can't help you any further. If you take a look here this should help you further: http://www.htpasswdgenerator.com/apache/htaccess.html
You may have missed this: So what's in there? It's always a plus to review what you copy and paste. This is what worked for me: Options +FollowSymLinks RewriteEngine On RewriteCond %{THE_REQUEST} \/index.html\ HTTP [NC] RewriteRule (.*)index.html$ /$1 [R=301,L]
Hey Thanks man its worked for me.. Thank You once again to you both.. One more thing its not showing index.html when i go in homepage but in Links when i hover my mouse it shows my old link with index.html.. How to remove it from their also
You mean hover over the links or what exactly? Now sure what you;re asking here. A link may be helpful.
Yes, I mean when i hover my mouse on Home button it shows me domain.com/index.html rather then domain.com.. But when i click and go to my homepage it simple shows domain.com. not shows index.html. I want same thing when hover mouse. I hope now u got it
I think you can add a title tag to it e.g. <a href="index.html" title="http://www.domain.com">Home</a> Code (markup):
Its not about Home button only. I have almost 3 to 4 keywords which are using domain.com/index.html. I want all of those keywords to show only domain.com rather than domain.com/index.html
Hey man your code work for PHP. Can you please tell me how to hide extensions of all internal pages also? (.html extension) ?
If you want to link to the index.html page without specifically stating <a href="index.html">Link</a> you can use the following code: <a href="/">Link to Homepage</a>. You'll have to go through and change these links manually on your site, or use Dreamweaver's (or your web editors) search function to find any <a href="index.html" and replace with <a href="/"