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)
-   -   Help with 301 redirects. (https://gfy.com/showthread.php?t=940381)

EthnicLover 11-25-2009 04:56 PM

Help with 301 redirects.
 
Is this the exact correct code for permanently redirecting individual pages through the .htaccess file?:

RewriteEngine On
Redirect 301 /main.html http://www.mysite.com/main.php

If I have many individual pages to redirect do I do this?:

RewriteEngine On
Redirect 301 /main.html http://www.mysite.com/main.php
Redirect 301 /tits.html http://www.mysite.com/tits.php
Redirect 301 /ass.html http://www.mysite.com/ass.php
Redirect 301 /teens.html http://www.mysite.com/teens.php
Redirect 301 /videobox.html http://www.mysite.com/video-box.php

Any help would be awesome. I also have the option through my hosting control panel to input one domain at a time for 301 redirects. I would prefer to learn this myself so any guidance is appreciated.

EthnicLover 11-25-2009 05:07 PM

I knew I should have put BOOBS in the title.

Can anyone help? With the 301 issue that is.

EthnicLover 11-26-2009 04:29 PM

Any help with this issue?

The Sultan Of Smut 11-26-2009 04:50 PM

You'll find some better ways here:
http://www.google.com/search?q=htacc...ct+html+to+php

Killswitch - BANNED FOR LIFE 11-26-2009 05:52 PM

Are you pretty much just redirecting .html files to the equivalent .php file?

EthnicLover 11-27-2009 01:57 PM

The first page for the Google search is this:

http://www.webweaver.nu/html-tips/web-redirection.shtml

It gives the same example that I wrote in this thread for redirecting a single/individual page:

Redirect 301 /oldpage.html http://www.example.com/newpage.html

I am changing all html files to php but a lot of the new files are named differently. For example:

8thstreetlatinas.html to 8th-street-latinas.php

Therefore should I use the initial example I used which seems to be the same as the one above?

Thanks.

woj 11-27-2009 05:01 PM

Why are you redirecting form .html to .php anyway?

Killswitch - BANNED FOR LIFE 11-27-2009 06:12 PM

Quote:

Originally Posted by EthnicLover (Post 16592512)
The first page for the Google search is this:

http://www.webweaver.nu/html-tips/web-redirection.shtml

It gives the same example that I wrote in this thread for redirecting a single/individual page:

Redirect 301 /oldpage.html http://www.example.com/newpage.html

I am changing all html files to php but a lot of the new files are named differently. For example:

8thstreetlatinas.html to 8th-street-latinas.php

Therefore should I use the initial example I used which seems to be the same as the one above?

Thanks.

You can do regex to redirect from .html to .php but for the renamed files, you'll have to put them in like you currently do.

Regex version is
Redirect 301 /(.*).html http://www.example.com/$1.php

Aric 11-27-2009 06:30 PM

Why not just let PHP parse .html?

Code:

RemoveHandler .html .htm
AddType application/x-httpd-php .php .htm .html


EthnicLover 11-30-2009 10:36 AM

Quote:

Originally Posted by Killswitch (Post 16593076)
You can do regex to redirect from .html to .php but for the renamed files, you'll have to put them in like you currently do.

Regex version is
Redirect 301 /(.*).html http://www.example.com/$1.php

Thanks for the info. Since most of my pages are now in different folders and have different names it looks like I will have to do the Redirect 301 for the majority.

By doing the 301 redirect there should be no loss of Search Engine rankings, correct?

Thanks.

Killswitch - BANNED FOR LIFE 11-30-2009 03:06 PM

Quote:

Originally Posted by EthnicLover (Post 16599922)
Thanks for the info. Since most of my pages are now in different folders and have different names it looks like I will have to do the Redirect 301 for the majority.

By doing the 301 redirect there should be no loss of Search Engine rankings, correct?

Thanks.

No, 301 tells the search engines that the file has moved, and to replace it with the new location.


All times are GMT -7. The time now is 08:29 PM.

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