GoFuckYourself.com - Adult Webmaster Forum

GoFuckYourself.com - Adult Webmaster Forum (https://gfy.com/index.php)
-   Fucking Around & Business Discussion (https://gfy.com/forumdisplay.php?f=26)
-   -   quick .htaccess question.. (https://gfy.com/showthread.php?t=549331)

xxweekxx 12-07-2005 05:35 PM

quick .htaccess question..
 
how do i redirect users that come to http://mysite.com to
http://www.mysite.com using htaccess

xxweekxx 12-07-2005 05:44 PM

bumpppppppppp

Machete_ 12-07-2005 05:44 PM

why would you worry about that, as long as the backlinks are to http://www.mysite.com and not http://mysite.com

xxweekxx 12-07-2005 05:46 PM

because for some weird reason http://mylink doesnt open crap..

how do i set the default page to index.php?

Machete_ 12-07-2005 05:47 PM

2. If you need to redirect http://mysite.com to
http://www.mysite.com and you've got mod_rewrite enabled on
your server you can put this in your .htaccess file:

Options +FollowSymLinks
RewriteEngine on
RewriteBase /
RewriteRule ^(.*).htm$ $1.html [R=301,L]

or this:

RewriteEngine On
RewriteCond %{HTTP_HOST} ^domain\.com$ [NC]
RewriteRule ^(.*)$ http://www.domain.com/$1 [R=301,L]

Tip: Use your full URL (ie http://www.domain.com) when
obtaining incoming links to your site. Also use your full
URL for the internal linking of your site.


http://www.isitebuild.com/301-redirect.htm

Machete_ 12-07-2005 05:49 PM

Quote:

Originally Posted by xxweekxx

how do i set the default page to index.php?

DirectoryIndex filename.html

or if yo want a whole list
DirectoryIndex filename.html index.cgi default.htm foo.html index.html


All times are GMT -7. The time now is 07:47 AM.

Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123