Back to Question Center
0

Sake rubutawa Semalt a index.html

1 answers:

Ina da index. html a kan html_directory akan shafin yanar gizon yanar gizo kuma na shiga wata doka kamar haka:

     RewriteRule ^ index. html $ newindex. php    

Ana buƙatar buƙata zuwa shafin yanar gizonku yana kewaya zuwa fassarar. fayil html, tambayoyinta:

  1. Ina bukatan samun index. html file a kan public_html shugabanci ko zan iya cire shi?
  2. Shin rubutattun rewritattunka daidai ne?
  3. Bisa ga mulkin na a kan - free construction logos icons. htaccess wanda shafin yake bude: index. html ko newindex. php ?
February 13, 2018

Fata na fahimta da kai daidai, kana so ka ayyana shafin shigarwa newindex. php don jagoran ku? Babu buƙatar sake rubutawa, kawai ƙayyade abin da shafin ke aiki kamar shafin shigarwa. A cikin. fayil na htaccess za ka iya ƙayyade:

  DirectoryIndex newindex. php 

Yanzu, idan wani ya kira ka http: // www. misali. com , shafin http: // www. misali. com / newindex. php za a nuna. Fayil din alamar. html ba wajibi ne a wannan yanayin ba, sunan shi ne kawai taron.

Idan ba ka so ka saita DirectoryIndex kamar martinstoeckli ya rubuta zan inganta sake rubutawa a cikin ɗan littafin:

  Sake RubutaRule ^ index \. html $ newindex. php [R = 301, L] 
  1. zaka iya cire alamar. html - ba a buƙata ba tare da wannan doka
  2. a'a, ba gaba ɗaya ba. Dots ya kamata a tsere a regexp tare da \ . Saboda shi ne ainihin shigarwa ta farko da ya kamata ka tura "m" (lambar HTTP Code 301) shafinka.
  3. sabonindex. php