Right now It just appears as an empty folder... i wanna redirect it to the main page... tried to google it but can't find it.
Htaccess code to redirect folders root with no index ?
Collapse
X
-
Htaccess code to redirect folders root with no index ?
Originally posted by rayadp05I rebooted, deleted temp files, history, cookies and everything...still cannot view the news clip. All I see is that fucking gay ass music video from "Rick Roll". Anyone else have a different link to the news clip?Tags: None -
Not sure if this is what you want....
Redirect /emptydirectory/ http://yoursite.com/whatever.htm
Mmmm.. not sure about the slash after emptydirectory - may have to drop thatXXX TLD's - Another mosquito to swat. -
It's not the empty directories I want to refresh, but the ones that are full but have no index page. I want it done automacly (not folder by folder). I have thousands of them on the site...
I accidently re-wrote htaccessOriginally posted by rayadp05I rebooted, deleted temp files, history, cookies and everything...still cannot view the news clip. All I see is that fucking gay ass music video from "Rick Roll". Anyone else have a different link to the news clip?Comment
-
Put this in your .htaccess:
This redefines the order in which it looks for your index pages. If you leave it only to main.html (assuming that's the name of your main page, if not rename as fit), then it will look for it in all further subdirectories. Thus the need to add more pages to the list.Code:DirectoryIndex main.html, index.html, index,shtml, index.php
Whitehat is for chumps
If you don't do it, somebody else will - true story!Comment
-
Gittin there!Originally posted by DamageXPut this in your .htaccess:
This redefines the order in which it looks for your index pages. If you leave it only to main.html (assuming that's the name of your main page, if not rename as fit), then it will look for it in all further subdirectories. Thus the need to add more pages to the list.Code:DirectoryIndex main.html, index.html, index,shtml, index.php
XXX TLD's - Another mosquito to swat.Comment
-
Thanks for your time but what I want to do is :Originally posted by DamageXPut this in your .htaccess:
This redefines the order in which it looks for your index pages. If you leave it only to main.html (assuming that's the name of your main page, if not rename as fit), then it will look for it in all further subdirectories. Thus the need to add more pages to the list.Code:DirectoryIndex main.html, index.html, index,shtml, index.php
when there is no index file, it just redirects to the site URL.
Basicly i got hundreads of folders containing galleries but do not use any index page. users try too type new folders to see if there are more galleries... so i want to use the 404 traffic to feed a tgp.Originally posted by rayadp05I rebooted, deleted temp files, history, cookies and everything...still cannot view the news clip. All I see is that fucking gay ass music video from "Rick Roll". Anyone else have a different link to the news clip?Comment
-
DirectoryIndex http://www.mydomain.comOriginally posted by WebbyAgain.. not sure
DirectoryIndex whatever.htm
ie.. where there is no default index and you want to address a main page as the default index?
That would redirect the index to my domain when there is no index.htm file ?Originally posted by rayadp05I rebooted, deleted temp files, history, cookies and everything...still cannot view the news clip. All I see is that fucking gay ass music video from "Rick Roll". Anyone else have a different link to the news clip?Comment
-
Use this then:Originally posted by Doctor DreThanks for your time but what I want to do is :
when there is no index file, it just redirects to the site URL.
Basicly i got hundreads of folders containing galleries but do not use any index page. users try too type new folders to see if there are more galleries... so i want to use the 404 traffic to feed a tgp.
Code:ErrorDocument 404 http://www.domaintoredirectto.com/pagetoredirectto.html
Whitehat is for chumps
If you don't do it, somebody else will - true story!Comment
-
If they hit my root directory up and the folder exist it's not a 404 error ...Originally posted by WebbyGot ya!
We talking 404's to cover this?
ErrorDocument 404 /yourpage.htmOriginally posted by rayadp05I rebooted, deleted temp files, history, cookies and everything...still cannot view the news clip. All I see is that fucking gay ass music video from "Rick Roll". Anyone else have a different link to the news clip?Comment
-
OK!!! Not getting bits yet...Originally posted by Doctor DreIf they hit my root directory up and the folder exist it's not a 404 error ...
If you have a local drive mirror of this content - how about getting a dir listing and making up one default index.htm which simply redirects to "wherever" and letting a batch file stuff a copy into each dir?XXX TLD's - Another mosquito to swat.Comment
-
Too much trouble I have gigs of content on there and I don't wanna waste the day.Originally posted by WebbyOK!!! Not getting bits yet...
If you have a local drive mirror of this content - how about getting a dir listing and making up one default index.htm which simply redirects to "wherever" and letting a batch file stuff a copy into each dir?
There is a htaccess code... I know it cauz i was using it... I overwrote it by accident.Originally posted by rayadp05I rebooted, deleted temp files, history, cookies and everything...still cannot view the news clip. All I see is that fucking gay ass music video from "Rick Roll". Anyone else have a different link to the news clip?Comment
-
Take a look here http://www.freewebmasterhelp.com/tutorials/htaccess/2
maybe you find what you looking for
Comment
-
Got to be something like that which fits whatever is neededOriginally posted by boldyWell when you turn off directory browsing using : Options -Indexes
then it turns into a 403 forbidden error
XXX TLD's - Another mosquito to swat.Comment

Comment