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)
-   -   Anyone interested in learning some mod_rewrite? (https://gfy.com/showthread.php?t=200890)

hornycash 11-23-2003 04:02 PM

Anyone interested in learning some mod_rewrite?
 
Heya!

Yes, i got it :) mod_rewrite was one of the big secrets for me
but now, i figured it out and wanna share my new knowledge
(it's not really deep but enough to set up something) with you
guy's :glugglug

so come on, let's share something :)

- Jesus Christ - 11-23-2003 04:04 PM

"i figured it out" :1orglaugh



You can do almost anything with mod_rewrite (except manupulate the contents of files)
its like a programming language.

Why 11-23-2003 04:07 PM

i have lots of stuff already setup using mod_rewrite. its pretty cool shit.

Weppel 11-23-2003 04:08 PM

Show me, i'm always willing to learn

fuzebox 11-23-2003 04:12 PM

mod_rewrite rocks :)

I'm curious, if you don't know how to use mod_rewrite, how else do you guys control your hotlinking?

hornycash 11-23-2003 04:12 PM

Quote:

Originally posted by - Jesus Christ -
"i figured it out" :1orglaugh



You can do almost anything with mod_rewrite (except manupulate the contents of files)
its like a programming language.

i know. for me it's interesting for SE-Optimization.
i'll program PHP, Java, VB, VB.net & Perl for about 5
Years but never ever do something with mod_rewrite

im happy that it works and wanna share this with
other peoples who may have the same starting
problems... a chatboard can be helpful :glugglug

Trafficbrokercom 11-23-2003 04:14 PM

http://www.engelschall.com/pw/apache/rewriteguide/

- Jesus Christ - 11-23-2003 04:15 PM

Quote:

Originally posted by hornycash


i know. for me it's interesting for SE-Optimization.
i'll program PHP, Java, VB, VB.net & Perl for about 5
Years but never ever do something with mod_rewrite

im happy that it works and wanna share this with
other peoples who may have the same starting
problems... a chatboard also can be helpful :glugglug

Its hard stuff to learn. Defianlty glad you found a new tool. I just thougt it was funny how you said you figured out its big secret. :thumbsup

Weppel 11-23-2003 04:15 PM

Quote:

Originally posted by Trafficbrokercom
http://www.engelschall.com/pw/apache/rewriteguide/
Gonna print that one for later reference, thanks.

Weppel 11-23-2003 04:16 PM

Quote:

Originally posted by hornycash


i know. for me it's interesting for SE-Optimization.
i'll program PHP, Java, VB, VB.net & Perl for about 5
Years but never ever do something with mod_rewrite

im happy that it works and wanna share this with
other peoples who may have the same starting
problems... a chatboard can be helpful :glugglug

What SE optimalisation can be done with mod_rewrite? Couldn't think of anything to be honest.. :helpme

- Jesus Christ - 11-23-2003 04:17 PM

Quote:

Originally posted by Weppel


What SE optimalisation can be done with mod_rewrite? Couldn't think of anything to be honest..

Anytime you have a string with more than 2 variables most engines wont follow the link. It allows you to run scripts behind the illusion of everything being an html file.

hornycash 11-23-2003 04:22 PM

Quote:

Originally posted by Weppel


What SE optimalisation can be done with mod_rewrite? Couldn't think of anything to be honest.. :helpme

ok, let's say you have a url like the following:

index.php?id=999&rid=2828&article=123asd

that's pretty shitty for Google. I have seen that sometimes
google index url's like the one above but google likes
static sites (probably with good content => content is god)

with mod_rewrite you can rewrite the url via .htaccess to
something like this:

index/999/2828/123asd.html


For this Example, the .htaccess should look like this:


Options +FollowSymLinks
RewriteEngine on
RewriteRule ^index/(.*)/(.*)/(.*).html /index.php?id=$1&rid=$2&article=$3


Now you can access the php file with index/999/2828/123asd.html
This is also good for using keywords in your url.

Weppel 11-23-2003 04:24 PM

Quote:

Originally posted by hornycash


ok, let's say you have a url like the following:

index.php?id=999&rid=2828&article=123asd

that's pretty shitty for Google. I have seen that sometimes
google index url's like the one above but google likes
static sites (probably with good content => content is god)

with mod_rewrite you can rewrite the url via .htaccess to
something like this:

index/999/2828/123asd.html


For this Example, the .htaccess should look like this:


Options +FollowSymLinks
RewriteEngine on
RewriteRule ^index/(.*)/(.*)/(.*).html /index.php?id=$1&rid=$2&article=$3


Now you can access the php file with index/999/2828/123asd.html

That's some good stuff man..

But most of the work done can be done through PHP itself though..

What i mostly do is, i parse a html file as a php file. I insert php in the .html file, and there you go. Google thinks its a static page, but it isnt, it's dynamic.

Should get you a few positions higher :Graucho

Weppel 11-23-2003 04:25 PM

But seriously, i like that stuff. Will keep this thread in mind, and if you have more tutorials / info pages, gimme, and ill start reading through them

hornycash 11-23-2003 04:29 PM

Quote:

Originally posted by Weppel
But seriously, i like that stuff. Will keep this thread in mind, and if you have more tutorials / info pages, gimme, and ill start reading through them

hmm you'll say that you send all your html pages through
the parser? god damn, that's a lot of extra work for your
machine but....

let's say, in your html page is one database query.
you wanna select an article from your database
now you'll have to send the url like this

example.html?article=222

with mod_rewrite it would look like

example/222.html

even more SE friendly :glugglug

SMG 11-23-2003 04:36 PM

I hate mod_rewrite :(

for the last 2 days my traffic on one site dropped to under 50% normal ... I couldnt figure out why, everyone could access the site, no problems whatsoever. I also noticed that it was specifically SE traffic that dropped, everything else was fine. I just found out that somehow ensim overwrote my custom modrewrite conf file so all my neat mod_rewrite tricks became 404s :(

Trafficbrokercom 11-23-2003 04:37 PM

Quote:

Originally posted by hornycash


example.html?article=222

with mod_rewrite it would look like

example/222.html


be careful if you use mod_rewrite to do something like this with a session ID. someone has a patent on this method.

hornycash 11-23-2003 04:37 PM

Quote:

Originally posted by SMG
I hate mod_rewrite :(

for the last 2 days my traffic on one site dropped to under 50% normal ... I couldnt figure out why, everyone could access the site, no problems whatsoever. I also noticed that it was specifically SE traffic that dropped, everything else was fine. I just found out that somehow ensim overwrote my custom modrewrite conf file so all my neat mod_rewrite tricks became 404s :(

hmm that sucks. don't you have a backup? :(

init 11-23-2003 05:04 PM

Quote:

Originally posted by hornycash
Heya!

Yes, i got it :) mod_rewrite was one of the big secrets for me
but now, i figured it out and wanna share my new knowledge
(it's not really deep but enough to set up something) with you
guy's :glugglug

so come on, let's share something :)

you should write a little informative tutorial with each command and a basic understanding and how to use it :thumbsup

Scherfi 11-23-2003 07:19 PM

Quote:

Originally posted by Trafficbrokercom


be careful if you use mod_rewrite to do something like this with a session ID. someone has a patent on this method.

are you serious with this? what exactly is patentent of it?


All times are GMT -7. The time now is 07:45 PM.

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