| Author |
Message |
businessguy SEO White Belt
Joined: 02 Jun 2006 Posts: 9
|
Posted: Sun Aug 13, 2006 6:57 pm Post subject: Simple Directory Question |
|
|
In general, when I set up subdirectories the default page is the index page.
So mydomain.com/sub/ defaults to mydomain.com/sub/index.html
How do I get it to default to mydomain.com/sub/keyword-article.html
Thanks
Arnold |
|
| Back to top |
|
 |
Rick S. SEO White Belt
Joined: 12 Jul 2006 Posts: 7 Location: Chicago
|
Posted: Mon Aug 14, 2006 2:43 am Post subject: |
|
|
You probably don't want to mess with this, but you could go into your httpd.conf file and change the DirectoryIndex from index.html to keyword-index.html.
Not very useful if a) you don't have access to the httpd.conf file, and b) if you want to change the keyword in the default file name to different things for different subs.
You might be better off placing an ".htaccess" file in each of your subs and editing them such that they do a 300 redirect from index.html to keyword-index.html.
I think this is how the .htaccess file would look:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{HTTP_HOST} ^mydomain\.com/sub/index\.html [nc]
RewriteRule (.*) http://mydomain\.com/sub/keyword-index\.html [R=301,L]
</IfModule>
You'll probably have to mess around with that a bit to get it right ... I know I always have to look up how to deal with the .htaccess file when I do this sort of thing.
Hope this gets you in the right direction. |
|
| Back to top |
|
 |
businessguy SEO White Belt
Joined: 02 Jun 2006 Posts: 9
|
|
| Back to top |
|
 |
businessguy SEO White Belt
Joined: 02 Jun 2006 Posts: 9
|
Posted: Tue Aug 15, 2006 9:26 am Post subject: |
|
|
Also I just learned that cpanel has a redirect feature built right into it.
So if the only way to make the directory landing page something other then the index page then the cpanet feature seems the easiest way to go.
Arnold |
|
| Back to top |
|
 |
|