![]() |
Htaccess code to redirect folders root with no index ?
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.
|
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 that |
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 htaccess |
Put this in your .htaccess:
Code:
DirectoryIndex main.html, index.html, index,shtml, index.php |
Again.. not sure :winkwink:
DirectoryIndex whatever.htm ie.. where there is no default index and you want to address a main page as the default index? |
Quote:
|
Quote:
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. |
Quote:
That would redirect the index to my domain when there is no index.htm file ? |
Got ya!
We talking 404's to cover this? ErrorDocument 404 /yourpage.htm |
Quote:
Code:
ErrorDocument 404 http://www.domaintoredirectto.com/pagetoredirectto.html |
Quote:
|
Quote:
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? |
Quote:
There is a htaccess code... I know it cauz i was using it... I overwrote it by accident. |
Ah... OK Doc... So can be covered at the server end..
Any clues as to what was used in the htaccess? Where is ServerGenius when ya need him? :winkwink: |
in htaccess (in your DocumentRoot)
Options -indexes ErrorDocument 403 / |
This got anything to do with directory browsing??
Ah... is it an ErrorDocument 403?? |
Take a look here http://www.freewebmasterhelp.com/tutorials/htaccess/2
maybe you find what you looking for :2 cents: |
Quote:
Well when you turn off directory browsing using : Options -Indexes then it turns into a 403 forbidden error :thumbsup |
Quote:
|
All times are GMT -7. The time now is 04:17 AM. |
Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123