![]() |
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 :) |
"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 have lots of stuff already setup using mod_rewrite. its pretty cool shit.
|
Show me, i'm always willing to learn
|
mod_rewrite rocks :)
I'm curious, if you don't know how to use mod_rewrite, how else do you guys control your hotlinking? |
Quote:
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 |
|
Quote:
|
Quote:
|
Quote:
|
Quote:
|
Quote:
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. |
Quote:
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 |
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
|
Quote:
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 |
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 :( |
Quote:
|
Quote:
|
Quote:
|
Quote:
|
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