Results 1 to 12 of 12
Thread: Problem with htaccess
-
07-22-2014, 08:33 PM #1Junior Guru Wannabe
- Join Date
- Oct 2013
- Posts
- 35
Problem with htaccess
Hi guys ,
I'm running a wordpress website . I use two index files . one is index.html and the other is index.php . As you know when there are two index files , if you open your site.com , by default index.html loads . I want to redirect index.html to index.php after it loaded . I mean I want index.html to load first and then redirects to index.php . how can I do this ?
-
07-22-2014, 08:38 PM #2Temporarily Suspended
- Join Date
- Jul 2014
- Location
- Malaysia
- Posts
- 61
-
07-22-2014, 08:45 PM #3Junior Guru Wannabe
- Join Date
- Oct 2013
- Posts
- 35
thanks for the answer , but it does not work . It stays on index.html and doesn't redirect to index.php
-
07-22-2014, 08:54 PM #4Temporarily Suspended
- Join Date
- Jul 2014
- Location
- Malaysia
- Posts
- 61
-
07-22-2014, 08:59 PM #5Junior Guru Wannabe
- Join Date
- Oct 2013
- Posts
- 35
3.pfilm14.ir open this site . it opens an html page that says loading... and after that it moves to the real wordpress site . I want the same
-
07-22-2014, 09:11 PM #6Temporarily Suspended
- Join Date
- Jul 2014
- Location
- Malaysia
- Posts
- 61
You can try something like this:
Code:<head> ... <script type="text/javascript"> if (document.documentElement) { document.documentElement.className = 'loading'; } </script> ... </head>
Code:.loading > body > * { display:none; } .loading body { background:#fff url(../images/loading.gif) no-repeat 50% 50%; }
Code:// Using jQuery $(document).ready(function() { ... $(document.documentElement).removeClass('loading'); ... });
-
07-22-2014, 09:39 PM #7Junior Guru Wannabe
- Join Date
- Oct 2013
- Posts
- 35
Thank you I will try them , let you know if they worked
-
07-23-2014, 09:32 AM #8Newbie
- Join Date
- Jul 2014
- Posts
- 12
Rather than using .htaccess you could use a meta refresh to instantly redirect the browser. This way index.html could be loaded and then redirected immediately to index.php.
Add something like this to the <head> section of index.html:
Code:<meta http-equiv="refresh" content="0;URL='http://www.example.com/index.php'" />
-
07-27-2014, 07:08 AM #9Newbie
- Join Date
- Jul 2014
- Location
- Cochin
- Posts
- 28
Use the below code in .htaccess so that index.html loads first
Code:DirectoryIndex index.html index.php
Cheers!
-
08-01-2014, 12:04 PM #10WHT Addict
- Join Date
- Jan 2013
- Posts
- 117
I'm not really sure why you would want to delay loading your index.php file by going to an index.html splash page with auto redirect to the index.php, but you may have your reason.
You can do the meta redirect in the index.html page and have it show your loading text or icon on a delay, say 5 seconds.
Code:<META HTTP-EQUIV="refresh" CONTENT="5;URL=the-other-page.html">
Code:DirectoryIndex index.php index.html
[B]Scott M
-
08-07-2014, 08:51 PM #11Newbie
- Join Date
- Jul 2009
- Location
- Los Angeles, California
- Posts
- 10
use the meta refresh as indicated above, but it would help if you said why you want this to happen?
-
08-18-2014, 09:05 AM #12WHT Addict
- Join Date
- Sep 2007
- Posts
- 120
Why don't you just delete the index.html reference if your ultimate goal is to load the index.php file? From my standpoint, I don't see why you want to load the index.html if it isn't where you want the browser to end up.
EmailHosting.com
http://www.emailhosting.com
Similar Threads
-
.htaccess problem
By juventus in forum Hosting Security and TechnologyReplies: 2Last Post: 03-20-2012, 08:04 AM -
.htaccess Problem?
By jisaiah14 in forum Web Design and ContentReplies: 2Last Post: 01-12-2012, 12:32 AM -
htaccess problem
By danyboy2010 in forum Programming DiscussionReplies: 2Last Post: 02-05-2007, 02:31 PM -
htaccess problem
By Sillysoft in forum Hosting Security and TechnologyReplies: 2Last Post: 03-06-2005, 03:55 AM -
.htaccess problem
By croakingtoad in forum Programming DiscussionReplies: 11Last Post: 04-05-2003, 10:02 PM