Welcome to the GoFuckYourself.com - Adult Webmaster Forum forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.

Post New Thread Reply

Register GFY Rules Calendar
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >
Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed.

 
Thread Tools
Old 11-18-2005, 01:46 AM   #1
rml1608
Confirmed User
 
Join Date: Sep 2004
Location: Central IL
Posts: 985
SEO Optimzation - Dynamic Pages coverting to static using .htaccess

Here is my .htaccess :

Options +FollowSymLinks
RewriteEngine on
RewriteRule ^category/([0-9][0-9])$ http://www.domain-name.com/index.php?sbcat_id=$1 [R]
RewriteRule ^category/([0-9][0-9])/$ http://www.domain-name.com/index.php?sbcat_id=$1
RewriteRule ^joke/([0-9][0-9][0-9])$ http://www.domain-name.com/index.php?sbjoke_id=$1 [R]
RewriteRule ^joke/([0-9][0-9][0-9])/$ http://www.domain-name.com/index.php?sbjoke_id=$1

This works perfectly fine - however when I change it to :


Options +FollowSymLinks
RewriteEngine on
RewriteRule ^category/([0-9][0-9])$ http://www.domain-name.com/index.php?sbcat_id=$1 [R]
RewriteRule ^category/([0-9][0-9])/$ http://www.domain-name.com/index.php?sbcat_id=$1
RewriteRule ^joke/([0-9][0-9][0-9][0-9])$ http://www.domain-name.com/index.php?sbjoke_id=$1 [R]
RewriteRule ^joke/([0-9][0-9][0-9][0-9])/$ http://www.domain-name.com/index.php?sbjoke_id=$1

I run into problems ...

I am assuming I can't use [0-10000] etc, al ...

Since I am only running into a problem when adding the 4th digit there has to be a 'programming' reason why, any programmers here have any idea ?
rml1608 is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 11-18-2005, 01:51 AM   #2
paterson3713
Confirmed User
 
Join Date: Nov 2005
Location: Edmonton, AB
Posts: 190
Why not do something like:

RewriteRule ^joke/([0-9]+)/$ http://www.domain-name.com/index.php?sbjoke_id=$1
__________________
paterson3713 is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 11-18-2005, 01:54 AM   #3
Damian_Maxcash
So Fucking Banned
 
Join Date: Oct 2002
Location: MaxCash.com
Posts: 12,745
Do a search for htacces

Someone did a post a little while ago that really covered it well.
Damian_Maxcash is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 11-18-2005, 02:00 AM   #4
rml1608
Confirmed User
 
Join Date: Sep 2004
Location: Central IL
Posts: 985
Quote:
Originally Posted by paterson3713
Why not do something like:

RewriteRule ^joke/([0-9]+)/$ http://www.domain-name.com/index.php?sbjoke_id=$1
Perfect, exactly what I was looking for - TYVM
rml1608 is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 11-18-2005, 02:10 AM   #5
paterson3713
Confirmed User
 
Join Date: Nov 2005
Location: Edmonton, AB
Posts: 190
Quote:
Originally Posted by rml1608
Perfect, exactly what I was looking for - TYVM
no problem.
__________________
paterson3713 is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 11-18-2005, 03:57 AM   #6
lakroze
Confirmed User
 
Join Date: Dec 2004
Location: 164924664
Posts: 3,527
cool but...

as I know google reads dynamic pages already...

or I'm wrong ?
lakroze is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 11-18-2005, 04:59 AM   #7
J.P.
Confirmed User
 
Join Date: Jun 2004
Posts: 689
Also you might want to consider this:

RewriteRule ^joke/([0-9]+)/?$ http://www.domain-name.com/index.php?sbjoke_id=$1

Note the ? sign after / and before $

It should look like this:

RewriteRule ^category/([0-9]+)/?$ http://www.domain-name.com/index.php?sbcat_id=$1 [R]
RewriteRule ^joke/([0-9]+)/?$ http://www.domain-name.com/index.php?sbjoke_id=$1 [R]

This way you need only two lines instead of four but get the same functionality...
__________________
Webmasters! Looking for new affiliate programs to promote?
Affiliate Program Search <-- Search for programs with FHGs, RSS feed, specific niche sponsors, ...
J.P. is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 11-18-2005, 05:08 AM   #8
J.P.
Confirmed User
 
Join Date: Jun 2004
Posts: 689
Oops, sorry did not see the [R] at the end

My previous post is not 100% accurate...

I see you're trying to redirect the URLs without the trailing slash to a correct URL.

RewriteRule ^(category|joke)/([0-9]+)$ http://www.domain-name.com/$1/$2/ [R=301]
RewriteRule ^category/([0-9][0-9])/$ http://www.domain-name.com/index.php?sbcat_id=$1
RewriteRule ^joke/([0-9][0-9][0-9])/$ http://www.domain-name.com/index.php?sbjoke_id=$1

This would be the correctly optimized form... Note the [R=301] part, which forces the 301 response for your redirect...

I assumed you want to redirect the /category/999 URLs to /category/999/ don't you? With your code you were redirecting it to /index.php?sbcat_id=999
__________________
Webmasters! Looking for new affiliate programs to promote?
Affiliate Program Search <-- Search for programs with FHGs, RSS feed, specific niche sponsors, ...
J.P. is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 11-18-2005, 05:09 AM   #9
AlienQ - BANNED FOR LIFE
best designer on GFY
 
AlienQ - BANNED FOR LIFE's Avatar
 
Join Date: Mar 2003
Location: IALIEN.COM - High Definition Video and Photographic Productions -ICQ 78943384
Posts: 30,307
Ahh nice.

Cloaking Variant.

Watch yer selves.
AlienQ - BANNED FOR LIFE is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 11-18-2005, 05:26 AM   #10
Marshal
Biz Dev and SEO
 
Marshal's Avatar
 
Industry Role:
Join Date: Jun 2005
Posts: 15,181
this post was great! exactly what i needed atm!
__________________
---
Busy ranking websites on Google...
Marshal is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 11-18-2005, 05:33 AM   #11
J.P.
Confirmed User
 
Join Date: Jun 2004
Posts: 689
Why would this be cloaking? It's a standard procedure to convert those messy queries to human readable URLs.
__________________
Webmasters! Looking for new affiliate programs to promote?
Affiliate Program Search <-- Search for programs with FHGs, RSS feed, specific niche sponsors, ...
J.P. is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 11-18-2005, 05:49 AM   #12
DirtyProfits
Confirmed User
 
Join Date: May 2005
Posts: 1,885
Could you show me an example how that looks on a site?
DirtyProfits is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 11-18-2005, 06:52 AM   #13
fuzzylogic
Confirmed User
 
fuzzylogic's Avatar
 
Join Date: Jun 2004
Location: buffalo, las vegas. icq: 285808879
Posts: 4,796
yo
booyakasha

stop with the htaccess jokes. they is over my head.
fuzzylogic is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 11-18-2005, 07:16 AM   #14
rml1608
Confirmed User
 
Join Date: Sep 2004
Location: Central IL
Posts: 985
"I assumed you want to redirect the /category/999 URLs to /category/999/ don't you? With your code you were redirecting it to /index.php?sbcat_id=999"

Sweet - that was the next issue I planned on tackling.. it was refreshing /category/999 to the /index.php?sbcat_id=999 format after putting it in the browser initially...

To the person who asked if Google indexes Dynamic pages, Shame on you!!! Just Kidding.. My ass got cased on HARD when I started a post about the subject a bit back ..

From what I have learned the last couple weeks of research they do, however they do not do it well at all. Google has hit my site with 2,450 requests and only indexed my index.html page. I think it is because EVERYTHING else on the site is dynamic - this will hopefully fix that problem.

Of course now my MySQL DB got screwed up somewhere along the lines last night and I have to figure out what I did there now .. No wonder I never get anything done, get something done just in time to break something that takes twice as logn to fix!

Last edited by rml1608; 11-18-2005 at 07:18 AM..
rml1608 is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 11-19-2005, 02:20 AM   #15
J.P.
Confirmed User
 
Join Date: Jun 2004
Posts: 689
How the hell did you break mySQL DB with mod_rewrite?
__________________
Webmasters! Looking for new affiliate programs to promote?
Affiliate Program Search <-- Search for programs with FHGs, RSS feed, specific niche sponsors, ...
J.P. is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 11-19-2005, 02:25 AM   #16
- Jesus Christ -
Confirmed User
 
Industry Role:
Join Date: Mar 2003
Location: ::::::::::::: :::::::::::||::::::::::: :::::::::::||::::::::::: :::::::::::||::::::::::: :::::::::::||::::::::::: :::::::::::||::::::::::: ::::::||||||||||||:::::: :::::::::::||::::::::::: :::::::::::||::::::::::: ::::::::::::::::::::::::
Posts: 7,197
Quote:
Originally Posted by J.P.
How the hell did you break mySQL DB with mod_rewrite?
mod_deflate gave me AIDS....

be careful guys.
__________________

Amen
- Jesus Christ - is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 11-19-2005, 02:29 AM   #17
fallenmuffin
Confirmed User
 
fallenmuffin's Avatar
 
Industry Role:
Join Date: Nov 2005
Posts: 8,170
Quote:
Originally Posted by lakroze
cool but...

as I know google reads dynamic pages already...

or I'm wrong ?
That's true but they tend not to like .ext?var=value as much as /var/value.html
fallenmuffin is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 11-19-2005, 02:39 AM   #18
SicChild
Confirmed User
 
Join Date: Mar 2003
Posts: 365
........
SicChild is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 11-19-2005, 02:41 AM   #19
paterson3713
Confirmed User
 
Join Date: Nov 2005
Location: Edmonton, AB
Posts: 190
Quote:
Originally Posted by fallenmuffin
That's true but they tend not to like .ext?var=value as much as /var/value.html
That's correct. From what I've read, google might not apply a page rank to a dynamic page with too many parameters, or maybe not even at all. Apparently sometimes it won't even index it. I think it's still a debated topic so it would probably be best to use Search Engine friendly urls.
__________________
paterson3713 is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 11-19-2005, 03:07 AM   #20
rml1608
Confirmed User
 
Join Date: Sep 2004
Location: Central IL
Posts: 985
Debatable is putting it mildly - http://www.gfy.com/showthread.php?t=...ogle+index+php is the last thread I started before I made the decision to clean my urls .....

Touchy Subject? Possibly A Reason?

I must be an asswipe to ask such a question, spending 30 hours researching it was 100X as productive - no information is free nowadays, outside the VERY BASICS ;)

A little bit of competition does good for a few reasons, can you guess? ;)
rml1608 is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 11-19-2005, 03:21 AM   #21
paterson3713
Confirmed User
 
Join Date: Nov 2005
Location: Edmonton, AB
Posts: 190
Quote:
Originally Posted by rml1608
Debatable is putting it mildly - http://www.gfy.com/showthread.php?t=...ogle+index+php is the last thread I started before I made the decision to clean my urls .....

Touchy Subject? Possibly A Reason?

I must be an asswipe to ask such a question, spending 30 hours researching it was 100X as productive - no information is free nowadays, outside the VERY BASICS ;)

A little bit of competition does good for a few reasons, can you guess? ;)
Well, PHP pages are fine. The thing is, when a spider comes across a dynamic page with a bunch of parameters it probably doesn't want to index it because it's not really a "page" like "mypage.html" would be, it's more like a feed or something since the content could potentially be changing every pageload. So I think that's why people tend to just use search engine friendly urls.
__________________
paterson3713 is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 11-19-2005, 05:41 AM   #22
J.P.
Confirmed User
 
Join Date: Jun 2004
Posts: 689
Apart of being SE friendly, they're also human friendly. People will easier remember http://www.somedomain.com/category/category-name.html than http://www.somedomain.com/index.php?...objectid=55725
__________________
Webmasters! Looking for new affiliate programs to promote?
Affiliate Program Search <-- Search for programs with FHGs, RSS feed, specific niche sponsors, ...
J.P. is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 11-19-2005, 05:55 AM   #23
Screaming
I can change this!!!!!
 
Join Date: Feb 2004
Posts: 18,972
Best of luck to you on this 1 guy.
__________________
Screaming is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 11-19-2005, 04:25 PM   #24
rml1608
Confirmed User
 
Join Date: Sep 2004
Location: Central IL
Posts: 985
Quote:
Originally Posted by paterson3713
Well, PHP pages are fine. The thing is, when a spider comes across a dynamic page with a bunch of parameters it probably doesn't want to index it because it's not really a "page" like "mypage.html" would be, it's more like a feed or something since the content could potentially be changing every pageload. So I think that's why people tend to just use search engine friendly urls.
Most php pages with alot of variables being called are like ..

http://www.domainname.com/script.php?xxxx etc

At the ? mark the search engines stop reading... at least a great deal of them do
__________________
ICQ : 253483920
DICK.IN | RXAR.COM - ICQ OFFERS
rml1608 is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 11-19-2005, 07:47 PM   #25
uno
RIP Dodger. BEST.CAT.EVER
 
uno's Avatar
 
Industry Role:
Join Date: Dec 2002
Location: NYC Area
Posts: 18,450
Quote:
Originally Posted by AlienQ
Ahh nice.

Cloaking Variant.

Watch yer selves.
__________________
-uno
icq: 111-914
CrazyBabe.com - porn art
MojoHost - For all your hosting needs, present and future. Tell them I sent ya!
uno is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Post New Thread Reply
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >

Bookmarks



Advertising inquiries - marketing at gfy dot com

Contact Admin - Advertise - GFY Rules - Top

©2000-, AI Media Network Inc



Powered by vBulletin
Copyright © 2000- Jelsoft Enterprises Limited.