[advanced search]
Results from the most recent live auction are here.
21 members in the live chat room. Join Chat!
Register Rules & FAQ NP$ Store Active Threads Mark Forums Read
Domain Name Industry Newsletter
Go Back   NamePros.Com > Design and Development > Programming
User Name
Password

Old 04-16-2006, 05:17 AM   · #1
BillyConnite
 
BillyConnite's Avatar
 
Name: Rhett
Location: Coffs H, Australia
Trader Rating: (77)
Join Date: Jul 2005
Posts: 3,106
NP$: 47.00 (Donate)
BillyConnite has a brilliant futureBillyConnite has a brilliant futureBillyConnite has a brilliant futureBillyConnite has a brilliant futureBillyConnite has a brilliant futureBillyConnite has a brilliant futureBillyConnite has a brilliant futureBillyConnite has a brilliant futureBillyConnite has a brilliant futureBillyConnite has a brilliant futureBillyConnite has a brilliant future
Wildlife Parkinson's Disease Parkinson's Disease
htacces default page help :)

Hey all!

Well there's something I can't get past in htaccess.

Im trying to make the default page a page that doesnt really exist... The default page is index.php which exists, but I want the default page set to index.html so that it is SEO friendly, but if I set the default page is index.html I get a 404 error even after adding a Rewrite Rule to redirect all .html's to .php's

Anyone have any suggestions?

This is what I have:

Code:
RewriteEngine On RewriteRule ^(.*).html $1.php DirectoryIndex index.html


Thanks everyone! Any help or suggestions are much appreciated.

Regards, Rhett.


Please register or log-in into NamePros to hide ads
__________________
<?php if(1===1){ $computer="fine."; }else{ $computer="broken."; } echo "Your computer is ".$computer; ?>
BillyConnite is offline   Reply With Quote
Old 04-16-2006, 06:02 AM   · #2
Xyzer
Steven
 
Xyzer's Avatar
 
Name: Steven Gibbons
Location: United Kindom
Trader Rating: (45)
Join Date: Aug 2005
Posts: 1,506
NP$: 40.00 (Donate)
Xyzer is a name known to allXyzer is a name known to allXyzer is a name known to allXyzer is a name known to allXyzer is a name known to allXyzer is a name known to all
Tsunami Relief AIDS/HIV
so, what does the index.php do?

I see now, it must be that the page doesnt exist, are you using the correct capitals etc? Thats the only thing i can see.

Last edited by webmonkey : 04-16-2006 at 06:07 AM.
Xyzer is offline   Reply With Quote
Old 04-16-2006, 06:55 AM   · #3
BillyConnite
 
BillyConnite's Avatar
 
Name: Rhett
Location: Coffs H, Australia
Trader Rating: (77)
Join Date: Jul 2005
Posts: 3,106
NP$: 47.00 (Donate)
BillyConnite has a brilliant futureBillyConnite has a brilliant futureBillyConnite has a brilliant futureBillyConnite has a brilliant futureBillyConnite has a brilliant futureBillyConnite has a brilliant futureBillyConnite has a brilliant futureBillyConnite has a brilliant futureBillyConnite has a brilliant futureBillyConnite has a brilliant futureBillyConnite has a brilliant future
Wildlife Parkinson's Disease Parkinson's Disease
Originally Posted by webmonkey
so, what does the index.php do?

I see now, it must be that the page doesnt exist, are you using the correct capitals etc? Thats the only thing i can see.


Hey webmonkey,

Yes the page doesnt exist, index.php exists, but not index.html.

But I am trying to make it SEO friendly, so im rewriting all links as .html, thats all done fine, only the default page is index.php, which is not as seo friendly as index.html. So if i set th default page as index.html it has an error as the file desont exist.

Know what I mean? lol.
__________________
<?php if(1===1){ $computer="fine."; }else{ $computer="broken."; } echo "Your computer is ".$computer; ?>
BillyConnite is offline   Reply With Quote
Old 04-16-2006, 08:40 AM   · #4
Xyzer
Steven
 
Xyzer's Avatar
 
Name: Steven Gibbons
Location: United Kindom
Trader Rating: (45)
Join Date: Aug 2005
Posts: 1,506
NP$: 40.00 (Donate)
Xyzer is a name known to allXyzer is a name known to allXyzer is a name known to allXyzer is a name known to allXyzer is a name known to allXyzer is a name known to all
Tsunami Relief AIDS/HIV
I know what you mean, maybe you should well im not sure, what about just using a seo friendly program, im sure sv will be back later. . .
Xyzer is offline   Reply With Quote
Old 04-16-2006, 05:59 PM   · #5
BillyConnite
 
BillyConnite's Avatar
 
Name: Rhett
Location: Coffs H, Australia
Trader Rating: (77)
Join Date: Jul 2005
Posts: 3,106
NP$: 47.00 (Donate)
BillyConnite has a brilliant futureBillyConnite has a brilliant futureBillyConnite has a brilliant futureBillyConnite has a brilliant futureBillyConnite has a brilliant futureBillyConnite has a brilliant futureBillyConnite has a brilliant futureBillyConnite has a brilliant futureBillyConnite has a brilliant futureBillyConnite has a brilliant futureBillyConnite has a brilliant future
Wildlife Parkinson's Disease Parkinson's Disease
Originally Posted by webmonkey
I know what you mean, maybe you should well im not sure, what about just using a seo friendly program, im sure sv will be back later. . .


lol . Yer SV'll probably turn up lol, as always. I'll look around for some seo software though. .
__________________
<?php if(1===1){ $computer="fine."; }else{ $computer="broken."; } echo "Your computer is ".$computer; ?>
BillyConnite is offline   Reply With Quote
Old 04-16-2006, 07:25 PM   · #6
Dan
Buy my domains.
 
Dan's Avatar
 
Name: Dan
Trader Rating: (63)
Join Date: Feb 2006
Posts: 2,801
NP$: 54.00 (Donate)
Dan has a brilliant futureDan has a brilliant futureDan has a brilliant futureDan has a brilliant futureDan has a brilliant futureDan has a brilliant futureDan has a brilliant futureDan has a brilliant futureDan has a brilliant futureDan has a brilliant futureDan has a brilliant future
Autism Autism Autism Autism Autism Autism Autism
Code:
RewriteEngine On RewriteRule ^([_A-Za-z0-9-]+)/?\.html $1.php [L]


Try that.
Dan is offline   Reply With Quote
Old 04-16-2006, 07:40 PM   · #7
BillyConnite
 
BillyConnite's Avatar
 
Name: Rhett
Location: Coffs H, Australia
Trader Rating: (77)
Join Date: Jul 2005
Posts: 3,106
NP$: 47.00 (Donate)
BillyConnite has a brilliant futureBillyConnite has a brilliant futureBillyConnite has a brilliant futureBillyConnite has a brilliant futureBillyConnite has a brilliant futureBillyConnite has a brilliant futureBillyConnite has a brilliant futureBillyConnite has a brilliant futureBillyConnite has a brilliant futureBillyConnite has a brilliant futureBillyConnite has a brilliant future
Wildlife Parkinson's Disease Parkinson's Disease
Originally Posted by Dan Friedman
Code:
RewriteEngine On RewriteRule ^([_A-Za-z0-9-]+)/?\.html $1.php [L]


Try that.


Hey Dan,

That part is working fine!

But when a search engine will find my website, it will go to http://www.domain.com/ which will use the default page http://www.domain.com/index.PHP instead of the rewritten http://www.domain.com/index.HTML. Im trying to get it to use the .html as its more seo friendly (having .html instead of .php). I've tried setting the default page to the index.html, but htaccess knows its not really there and has a 404 error.

Know what I mean?
__________________
<?php if(1===1){ $computer="fine."; }else{ $computer="broken."; } echo "Your computer is ".$computer; ?>
BillyConnite is offline   Reply With Quote
Old 04-16-2006, 08:01 PM   · #8
Dan
Buy my domains.
 
Dan's Avatar
 
Name: Dan
Trader Rating: (63)
Join Date: Feb 2006
Posts: 2,801
NP$: 54.00 (Donate)
Dan has a brilliant futureDan has a brilliant futureDan has a brilliant futureDan has a brilliant futureDan has a brilliant futureDan has a brilliant futureDan has a brilliant futureDan has a brilliant futureDan has a brilliant futureDan has a brilliant futureDan has a brilliant future
Autism Autism Autism Autism Autism Autism Autism
Make an index.html and set index.html to the main page.

Maybe?
Dan is offline   Reply With Quote
Old 04-16-2006, 08:14 PM   · #9
Jim_
NamePros Regular
 
Jim_'s Avatar
 
Name: Jim, of course
Location: Philadelphia
Trader Rating: (20)
Join Date: Aug 2005
Posts: 558
NP$: 14.30 (Donate)
Jim_ is a glorious beacon of lightJim_ is a glorious beacon of lightJim_ is a glorious beacon of lightJim_ is a glorious beacon of lightJim_ is a glorious beacon of light
Save The Children
Make an index.html.php file.
__________________
woop woop
Jim_ is offline   Reply With Quote
Old 04-16-2006, 08:27 PM   · #10
BillyConnite
 
BillyConnite's Avatar
 
Name: Rhett
Location: Coffs H, Australia
Trader Rating: (77)
Join Date: Jul 2005
Posts: 3,106
NP$: 47.00 (Donate)
BillyConnite has a brilliant futureBillyConnite has a brilliant futureBillyConnite has a brilliant futureBillyConnite has a brilliant futureBillyConnite has a brilliant futureBillyConnite has a brilliant futureBillyConnite has a brilliant futureBillyConnite has a brilliant futureBillyConnite has a brilliant futureBillyConnite has a brilliant futureBillyConnite has a brilliant future
Wildlife Parkinson's Disease Parkinson's Disease
Originally Posted by Jim_
Make an index.html.php file.


Hey Jim,

But that would mean the extension is still .php which isn't seo friendly..

Im beginning to think that maybe I haven't stated mt problem clear enough lol.
__________________
<?php if(1===1){ $computer="fine."; }else{ $computer="broken."; } echo "Your computer is ".$computer; ?>
BillyConnite is offline   Reply With Quote
Old 04-16-2006, 08:42 PM   · #11
Dan
Buy my domains.
 
Dan's Avatar
 
Name: Dan
Trader Rating: (63)
Join Date: Feb 2006
Posts: 2,801
NP$: 54.00 (Donate)
Dan has a brilliant futureDan has a brilliant futureDan has a brilliant futureDan has a brilliant futureDan has a brilliant futureDan has a brilliant futureDan has a brilliant futureDan has a brilliant futureDan has a brilliant futureDan has a brilliant futureDan has a brilliant future
Autism Autism Autism Autism Autism Autism Autism
I understand.. try your first code but just make an index.html

And if that doesn't work try your first code but move DirectoryIndex about RewriteRule
Dan is offline   Reply With Quote
Old 04-16-2006, 08:59 PM   · #12
Borghunter
Resistance is Futile
 
Borghunter's Avatar
 
Name: Mitchell
Location: Calgary, Canada
Trader Rating: (26)
Join Date: Apr 2006
Posts: 1,093
NP$: 232.05 (Donate)
Borghunter is a name known to allBorghunter is a name known to allBorghunter is a name known to allBorghunter is a name known to allBorghunter is a name known to allBorghunter is a name known to all
Wildlife
The original one you made works fine for me!
__________________
████ Watch FREE Domain Names Videos by Gurus ████
The Best Check Page Rank
Borghunter is offline  
  Reply With Quote
Old 04-16-2006, 09:23 PM   · #13
BillyConnite
 
BillyConnite's Avatar
 
Name: Rhett
Location: Coffs H, Australia
Trader Rating: (77)
Join Date: Jul 2005
Posts: 3,106
NP$: 47.00 (Donate)
BillyConnite has a brilliant futureBillyConnite has a brilliant futureBillyConnite has a brilliant futureBillyConnite has a brilliant futureBillyConnite has a brilliant futureBillyConnite has a brilliant futureBillyConnite has a brilliant futureBillyConnite has a brilliant futureBillyConnite has a brilliant futureBillyConnite has a brilliant futureBillyConnite has a brilliant future
Wildlife Parkinson's Disease Parkinson's Disease
OH OH OH OOOHHHH!!!!

Got it lol.

DAN you are a legend, just did what you said to (create an index.html) and it works brilliantly

NP$ sent to you + rep.

Thanks everyone else also for helping, rep left to all the people who helped that I could actually leave rep to (I couldnt with some as I had already recently).

Thanks all!
Rhett.
__________________
<?php if(1===1){ $computer="fine."; }else{ $computer="broken."; } echo "Your computer is ".$computer; ?>
BillyConnite is offline   Reply With Quote
Closed Thread

NamePros is a revenue sharing forum.

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


Site Sponsors
EscrowDNS Website Header Design Buy Flash Arcade Game Script
Advertise your business at NamePros
All times are GMT -7. The time now is 10:33 AM.


Powered by: vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 2.4.0