How to remove index.html from URL?
2015-01-04, 10:42 AM,
#1
I uploaded file to mysite.com/niche
The folder has index.html file so the link will be mysite.com/niche/index.html
I want to remove index.html so it'd be better link
How can I do that? (I check google for htaccess but no help, maybe another code would help)
Reply
Share This Thread :

2015-01-04, 11:23 AM,
#2
Use this: http://alexcican.com/post/how-to-remove-...-htaccess/

and then upload the .htacess to your root folder of your website and make sure your host allows .htaccess's

[Image: u90z4i6.png]
Reply
2015-01-04, 01:05 PM,
#3
(2015-01-04, 11:23 AM)Twisted Fate Wrote: Use this: /post/how-to-remove-php-html-htm-extensions-with-htaccess/

and then upload the .htacess to your root folder of your website and make sure your host allows .htaccess's

You got me wrong. I want to remove index.html, your recommended post is about remove extension (.htlm)
Thanks for the help tho.
Reply
2015-01-04, 09:46 PM,
#4

Any questions related to CPA belong here.
Before posting, make sure you are in the correct section.

I am temporarily absent due to family circumstances.

Reply
2015-01-05, 07:28 AM, (This post was last modified: 2015-01-05, 07:30 AM by immart247.)
#5
(2015-01-04, 09:46 PM)DutchPride Wrote: Try this:
https://forums.digitalpoint.com/threads/...l.1657640/

I fixed by using code from this topic :)
For anyone else who need this:
Code:
Options +FollowSymLinks
RewriteEngine On
RewriteCond %{THE_REQUEST} \/index.html\ HTTP [NC]
RewriteRule (.*)index.html$ /$1 [R=301,L]
Change html to php if you want to remove index.php
After that you can use link: mysite.com/niche/ instead of mysite.com/niche/index.html
Reply
2015-02-01, 10:39 AM,
#6
Like others are pointing too, yet forgetting the name for this; which is called mod_rewrite. You can do a lot of cool stuff with it regarding URL etc..
Reply
2015-02-01, 08:26 PM,
#7
Just ignore the index.html and type it like this

Www.mysite.com/niche/

It will still load ur site

Join The Best Network Today And Earn REAL Money! The secret to success lies here.

[Image: jqE21u3.gif]
Reply
2015-02-01, 08:31 PM, (This post was last modified: 2015-02-01, 08:32 PM by BlackHatSEO.)
#8
(2015-02-01, 08:26 PM)Superhero99 Wrote: It will still load ur site

No, the site will load only (if called without "index.html"), if there is a setting like

Code:
DirectoryIndex index.html

or at least the command "DirectoryIndex" followed by other filenames and "index.html" included.

This place is intentionally left blank.
Reply
2015-02-02, 04:38 PM,
#9
(2015-02-01, 08:31 PM)BlackHatSEO Wrote:
(2015-02-01, 08:26 PM)Superhero99 Wrote: It will still load ur site

No, the site will load only (if called without "index.html"), if there is a setting like

Code:
DirectoryIndex index.html

or at least the command "DirectoryIndex" followed by other filenames and "index.html" included.


Wierd, cos Most of my sites can be run without that setting you mentionned. If i have www.myniche.com/niche/index.html i can just write www.myniche.com/niche/ and it will still load the page. :)

Join The Best Network Today And Earn REAL Money! The secret to success lies here.

[Image: jqE21u3.gif]
Reply
2015-02-02, 04:48 PM,
#10
You don't have to write the index.html part, it's optional. 'index' is a reserved file name, so the server will always load it first on top of all other files.
Reply


Related Threads
Thread Author Replies Views Last Post
  Clash of Clans HTML template - HQ template M!st3r XX 21 8,436 2018-06-29, 11:05 AM
Last Post: sreemons2010
  OFFER EXPIRED- PLEASE REMOVE THREAD SwiffJustus 1 308 2018-05-04, 06:42 PM
Last Post: gmax29
  Premium URL Shortener - v4.2 - HOTFIX - CodeCanyon M!st3r XX 28 6,323 2017-08-19, 08:27 AM
Last Post: dikaFp
  How to remove the slider budiman 2 603 2017-04-20, 07:22 PM
Last Post: EctaPrime
  [Help]CPAGrip custom URL Locker fieldy2012 5 2,069 2017-04-04, 12:54 PM
Last Post: budiman





About Us | Contact Us | CPA Elites | Advertise | Stats

© 2013-2018 CPA Elites Ltd
Enhanced by MyBB and WallBB
Return to top