The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Simple mod rewrite with PHP?
I can figure out how to do it with Apache, but I recently learned that URL rewriting can be done with PHP as well.
How would I make it so these URL's are on in the same with PHP? Code:
http://www.domain.com/area/location.html http://www.domain.com/index.php?area=location |
#2
|
|||
|
|||
This goes in your .htaccess file
Code:
RewriteRule ^area/([^/]*).html$ /index.php?area=$1 |
#3
|
|||
|
|||
That's nice of you, thank you, I was looking for a PHP version though. I kind of don't want to turn 'RewriteEngine' on for something small. Unless I'm being stupid?
If I am being stupid, would that work as if both versions were input, the same location would come up, and the url would say the simpler one either way? Also, would this make area a variable as well? Code:
RewriteRule ^([^/]*)/([^/]*).html$ /index.php?$1=$2 |
#4
|
|||
|
|||
You could also do:
Code:
RewriteRule ^area/(.*).html$ index.php?area=$1 |
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|