carubmun
06-09-2008, 07:36 AM
My forums are at www.dailysportspages.com/forums/index.php.
I have a news management script at the root, vB in the "forums" folder.
The .htaccess of my root is the following...
Options All -Indexes
ErrorDocument 404 /404.php
FileETag MTime Size
php_value memory_limit "48M"
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{HTTP_HOST} ^dailysportspages.com
RewriteRule (.*) http://www.dailysportspages.com/$1 [R=301,L]
RewriteRule ^sitemap\.xml$ feed.php?output_type=sitemap [L]
RewriteRule ^(.*)(\.html|\.htm)$ index.php [L]
RewriteRule ^(.*)(\.rss|\.atom|\.txt)$ feed.php [L]
RewriteRule ^([^.]*)/?$ index.php [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
</IfModule>
<IfModule mod_expires.c>
ExpiresActive on
ExpiresByType image/gif "access plus 1 months"
ExpiresByType image/jpeg "access plus 1 months"
ExpiresByType image/png "access plus 1 months"
</IfModule>
I was able to figure out how to add the rewrite condition to do a 301 redirect so when people type in the non "www" URL they still got to my site.
My problem now is that before i did this people were reaching my site by bookmark.
And their bookmark has the site as "dailysportspages.com/forums"... no "index.php".
When they click on their bookmarks/favorites... they get a blank page.
Im sure there is a simple way to redirect them to the main page, but the few things i tried didnt work.
Any help?
I have a news management script at the root, vB in the "forums" folder.
The .htaccess of my root is the following...
Options All -Indexes
ErrorDocument 404 /404.php
FileETag MTime Size
php_value memory_limit "48M"
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{HTTP_HOST} ^dailysportspages.com
RewriteRule (.*) http://www.dailysportspages.com/$1 [R=301,L]
RewriteRule ^sitemap\.xml$ feed.php?output_type=sitemap [L]
RewriteRule ^(.*)(\.html|\.htm)$ index.php [L]
RewriteRule ^(.*)(\.rss|\.atom|\.txt)$ feed.php [L]
RewriteRule ^([^.]*)/?$ index.php [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
</IfModule>
<IfModule mod_expires.c>
ExpiresActive on
ExpiresByType image/gif "access plus 1 months"
ExpiresByType image/jpeg "access plus 1 months"
ExpiresByType image/png "access plus 1 months"
</IfModule>
I was able to figure out how to add the rewrite condition to do a 301 redirect so when people type in the non "www" URL they still got to my site.
My problem now is that before i did this people were reaching my site by bookmark.
And their bookmark has the site as "dailysportspages.com/forums"... no "index.php".
When they click on their bookmarks/favorites... they get a blank page.
Im sure there is a simple way to redirect them to the main page, but the few things i tried didnt work.
Any help?