MyBB Community Forums

Full Version: Want SEO Links - but already have a .htaccess file
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello everybody. I am new to SEO and made a .htaccess file for a store script I am using. So my question is, can I just copy and paste the htaccess.txt text into the other .htaccess file or do I need to do other things to the file?

Here is the shop version of the .htaccess file

RewriteEngine on
RewriteRule ^/ shop.php
RewriteRule ^reviews-([A-Za-z0-9]+)-([a-z0-9]+)-([A-Za-z0-9]+)-([0-9]+)-([A-Za-z0-9_]+).html shop.php?c=$1&n=$2&i=$3&p=$4&a=reviews
RewriteRule ^buy-([A-Za-z0-9]+)-([a-z0-9]+)-([A-Za-z0-9]+)-([A-Za-z]+)-([0-9]+)-([A-Za-z0-9_]+).html shop.php?c=$1&n=$2&i=$3&m=$4&p=$5&a=buy
RewriteRule ^([A-Za-z0-9]+)-([a-z0-9]+)-([A-Za-z0-9+_"]+)-([A-Za-z0-9+_]+)-([a-z]+)-([0-9]+).html shop.php?c=$1&n=$2&k=$3&t=$4&s=$5&p=$6
RewriteRule ^([A-Za-z0-9]+)-([a-z0-9]+)-([A-Za-z0-9+_"]+)-([a-z]+)-([0-9]+)-([A-Za-z0-9_]+).html shop.php?c=$1&n=$2&k=$3&s=$4&p=$5
RewriteRule ^([A-Za-z0-9]+)-([a-z0-9]+)-([a-z]+)-([0-9]+)-([A-Za-z0-9_]+).html shop.php?c=$1&n=$2&s=$3&p=$4
RewriteRule ^([A-Za-z0-9]+)-([a-z0-9]+)-([A-Za-z0-9]+)-([A-Za-z0-9_]+).html shop.php?c=$1&n=$2&i=$3
RewriteRule ^([A-Za-z0-9]+)-([a-z0-9]+)-([A-Za-z0-9_]+).html shop.php?c=$1&n=$2
RewriteRule ^page-([A-Za-z0-9+_"]+).html shop.php?a=$1
RewriteRule ^([A-Za-z0-9]+)-([A-Za-z0-9_]+).html shop.php?c=$1
RewriteRule ^item-([A-Za-z0-9]+) shop.php?i=$1
RewriteRule ^search-([A-Za-z0-9+_"]+) shop.php?k=$1

Any help would be appreciated.
after the last line of your .htaccess add the following
RewriteRule ^forum-([0-9]+).html forumdisplay.php?fid=$1 [L,QSA]
	RewriteRule ^forum-([0-9]+)-page-([0-9]+).html forumdisplay.php?fid=$1&page=$2 [L,QSA]

	RewriteRule ^thread-([0-9]+).html showthread.php?tid=$1 [L,QSA]
	RewriteRule ^thread-([0-9]+)-page-([0-9]+).html showthread.php?tid=$1&page=$2 [L,QSA]
	RewriteRule ^thread-([0-9]+)-lastpost.html showthread.php?tid=$1&action=lastpost [L,QSA]
	RewriteRule ^thread-([0-9]+)-nextnewest.html showthread.php?tid=$1&action=nextnewest [L,QSA]
	RewriteRule ^thread-([0-9]+)-nextoldest.html showthread.php?tid=$1&action=nextoldest [L,QSA]
	RewriteRule ^thread-([0-9]+)-newpost.html showthread.php?tid=$1&action=newpost [L,QSA]
	RewriteRule ^thread-([0-9]+)-post-([0-9]+).html showthread.php?tid=$1&pid=$2 [L,QSA]

	RewriteRule ^post-([0-9]+).html showthread.php?pid=$1 [L,QSA]

	RewriteRule ^announcement-([0-9]+).html announcements.php?aid=$1 [L,QSA]

	RewriteRule ^user-([0-9]+).html member.php?action=profile&uid=$1 [L,QSA]

	RewriteRule ^calendar-([0-9]+).html calendar.php?calendar=$1 [L,QSA]
	RewriteRule ^calendar-([0-9]+)-year-([0-9]+).html calendar.php?action=yearview&calendar=$1&year=$2 [L,QSA]
	RewriteRule ^calendar-([0-9]+)-year-([0-9]+)-month-([0-9]+).html calendar.php?calendar=$1&year=$2&month=$3 [L,QSA]
	RewriteRule ^calendar-([0-9]+)-year-([0-9]+)-month-([0-9]+)-day-([0-9]+).html calendar.php?action=dayview&calendar=$1&year=$2&month=$3&day=$4 [L,QSA]
	RewriteRule ^calendar-([0-9]+)-week-([0-9]+).html calendar.php?action=weekview&calendar=$1&week=$2 [L,QSA]

	RewriteRule ^event-([0-9]+).html calendar.php?action=event&eid=$1 [L,QSA]
(2008-08-11, 01:03 AM)pepotiger Wrote: [ -> ]after the last line of your .htaccess add the following
I did that but there is now a problem. Now no matter what forum or thread I click on the page it redirects to shop.php.

I had the same problem when I used the SEO plugin. Anybody know the cause? The .htaccess file is in the original post.
remove this line from your .htaccess
RewriteRule ^/ shop.php
Read this thread. It works. Read all of it. It works for me.

http://community.mybboard.net/thread-34901.html