Damit muss ich aber für bei $_GET die Variable und den Wert setzen, damit es die nächste Variable erkennt.
Gibt es eine Möglichkeit den Wert zu überspringen?
So würde es ohne der .htaccess aussehen:
Quote:
p3&p4=a4
Und so mit:
Quote:
p3/p4/a4
Wenn nicht, würde es dann gehen, wenn ein bestimmtes Zeichen bei der Variable (hier p3) drangehangen wird, dass es den Wert dann überspringt? Also so z.B.
wieso machst du das so komplex? leite doch einfach alle anfragen bei dennen die datei nicht vorhanden sind an die index.php weiter und definier dir routen in php da kannst das um einiges besser steuern, meiner meinung. zumindest laeuft das bei allen groeßeren sachen so
wieso machst du das so komplex? leite doch einfach alle anfragen bei dennen die datei nicht vorhanden sind an die index.php weiter und definier dir routen in php da kannst das um einiges besser steuern, meiner meinung. zumindest laeuft das bei allen groeßeren sachen so
Verstehe ich nicht so ganz, wie meinst du das?
Beispiele wären klasse
Quote:
Originally Posted by turk55
You are trying to hard, keep the first parameter and simply explode the url.
I don't get what you're trying to explain. How about a few examples?
Das wollte ich doch gar nicht.
Ich will mein Link nur anders anzeigen lassen, sodass ich nicht immer ein value bei $_GET brauche sondern auch hin und wieder nur ein key (oben eig. gut genug erklärt, es kamen ja keine Verständnisfragen).
I don't get what you're trying to explain. How about a few examples?
Let's say the url is "website.com/index.php?page=news/15/test" without the htaccess rewrite rule, otherwise "website.com/news/15/test" but nevermind that.
So a simple explode will look like this:
$url = explode("/", $_GET["page"]);
$url is an array now where it splitted the string "news/15/test" using the slash (/) as delimiter
the value of $url[0] is news
the value of $url[1] is 15
the value of $url[2] is test
Oh and you should check always check those parameters for dots (.) and slashes (/). Otherwise hackers might end up using an RFI Injection.
I want to tell the URL a GET with a key and a value but sometimes I don't have a value so I want to ignore the value part.
Example:
website.com/index.php?key=value&key2=value2&key3&key4=value4
website.com/key/value/key2/value2/key3/key4/value4
key3 has no value and with my code (in the first post) "key4" would be the value for value3
My question is, how can I say that key3 has no value so that I can jump over the value3?
[HELP] Mod rewrite on CMS by Hen! 04/04/2014 - Metin2 Private Server - 2 Replies Hi!
Whether it is possible to shorten links to such a form /register from index.php?s=register in CMS by Henn! ?
Oh, I forgot, how can I insert recaptcha(from google) to register or any other site?
Thanks!
Mod Rewrite Hilfe 03/13/2014 - Web Development - 4 Replies Hey,
Brauche mal kurze Hilfe.
Habe derzeit folgende URL :
blablabla.de/?blabla=123
will gerne das ich aber über
blablabla.de/123
Mod Rewrite Problem 09/09/2013 - Web Development - 3 Replies Hallo Elitepvpler!
Und zwar habe ich ein Problem. Ich habe einen Signaturen Generator. Die Links spuckt er mir so aus: klick
Mit meiner .htaccess sollte es dann aber so gehen:
http://134.255.216.192/1/2.png
Hier meine .htaccess:
RewriteEngine OnRewriteRule ^(*)/(*)\.png$ /signature.php?id=$1&signature=$2
htaccess URL Rewrite 04/17/2013 - Web Development - 4 Replies Hallo,
Kenne mich mit htacess URL Rewrite nicht wirklich aus, daher Frage ich hier nach. Also folgendes:
Punkt 1)
Wenn eine Person die Datei z.B /install/install.php aufruft wie sieht der htaccess Code dafür aus das er nur /install/ sieht?
Punkt 2)
Wenn jemand die URL username.game.domain.tld aufruft wie ist es Möglich das diese dann auf /profile/username.php weiterleitet?
Old SREmu ReWrite - Working 01/19/2009 - SRO Hacks, Bots, Cheats & Exploits - 116 Replies Step 1 - Install Visual Basic 6
Step 2 - Go to http://svn.darkinc.net/srvb/ and download all the files to your computer username is user and theres no password. or just download this one (Rev 45) but it might be updated because cls is constantly re coding it all.
RapidShare: 1-Click Webhosting
Step 3 - Locate to C:\Windows\System32\drivers\etc and add the following lines to your hosts file.
- 127.0.0.1 gwgt1.joymax.com
- 127.0.0.1 gwgt2.joymax.com
Step 4 - Download the cracked...