PHP - Setup Vanity Url For Own Domain?
I want to convert this url www.2aek.com/userprofile.php?username=zac1987 into www.2aek.com/zac1987
How to do that? I google search "dns setup vanity url" but I can't find any result. After I change it to vanity url, the php get method still can function without any problem? Similar TutorialsHey all, How would you do a vanity URL redirect? For example, you put this in flyer: site.com/yourpage but when user puts that in URL, it really goes to: site.com/products/1?category=1 Thanks for response. I need to implement vanity url's on our web site, partly because they look "prettier" but more importantly because Google doesn't seem to like links that end in ".pgm" (many of our pages on our IBM iSeries are written using Websmart ILE and the program suffix is ".pgm").
I am halfway there, I think, but I am not sure if I am doing this right, and I still find taking examples of htaccess redirects and applying them to what I am trying to achieve pretty complicated.
All the page links are coded correctly and are going to the right place, but the browser is showing the resulting url, not the link that is clicked on.
Hopefully someone can help to steer me in the right direction if I explain what we have...
The resulting link needs to be:
http://www.mydomain.com/prodpage.pgm?name=750ml Orange Line Marker Spray Paint&item=41912The vanity link should be: http://www.mydomain.com/product/41912/750ml Orange Line Marker Spray PaintI have this working using the following in .htaccess: RewriteRule product/(.*)/(.*) http://www.mydomain.com/prodpage.pgm?name=$2&item=$1 [L]However... the url that shows in the browser is the resulting link. I need it to be the link that is clicked on. Any thoughts please. I have tried lots of things but nothing seems to give the desired result. I have two domains both running SSL. Let's call them old-domain and new-domain. old-domain is permanently redirecting traffic to new-domain. There are still a lot of links out there to old-domain with https://. If I were to remove SSL from old-domain but keep SSL on new-domain, I am betting that users will be getting some sort of certificate error. Right? Any way around that if I want to remove SSL from old-domain?
This topic has been moved to the corner of 3rd Avenue and mod_rewrite. http://www.phpfreaks.com/forums/index.php?topic=359430.0 Hi
I am not sure if this is the right area for my question, but here goes.
I have a generic script that reads in my wordpress posts and does some pagination.
This code works well on my server (php version 5.2.17):
http://torontomissis...es.com/kath.php
Here is the pdf of the php.ini info: http://torontomissis.../php-5-2-17.pdf
However when I copied it over to another server, the pagination code does not display (php version 5.3.10)
http://blueshiftdesi...g/blog/kath.php
Here is the pdf of the php.ini file info: http://torontomissis...om/php5-3-10.pd
There shouldn't be any reason for this to happen, so I tried to compare the php.ini file from both servers
and there are some differences, one in particular which in the 5.2.17 version
disable_functions is set to "no value" in the 5.2.17 (which works)
and in the 5.3.10 version disable_functions contains a large string of data.
I don't have much experience with the php.ini file so any help is appreciated.
Hi Guys, Just in the process of learning PHP and I am wandering if I need to learn more when finished to complete a certain process. I apologise if this explanation is pretty naff but I cant think of how to word it, but here goes: So what I am looking at doing with a script is creating a place to display information about games, So what I am thinking is there will be a backend where I can kind of add a new game then inside there I can add news articles, videos, images etc. The one thing I cant wrap my head around is if I were to display like trophies for the games like the PS4 trophies, how this would work. So I imaging the backend to be like 'add a game button' then when I click that I get a setup page where I can enter the title, developer, age rating and so on. With the trophies obviously what I am thinking is a text are that will say how many trophies does the game have? So in there I enter let's say 20 then this will add me 20 slots in which I can enter the trophy title, description and points. So my question is when you are creating a form like this where it works off an action like me entering 20 and it producing 20 slots can all this be done with PHP or do I need to be using other code also? Hope that explanation is decent enough. Huge thank you for any advice in advance. Apache https setup!
Okay so i made my own SSL certificate for my localhost using these commands
OpenSSL: ( CMD > c:\xampp\apache\bin\openssl )
req -config c:\xampp\php\extras\ssl\openssl.cnf -new -out jobnow.csr -keyout jobnow.pem rsa -in jobnow.pem -out c:\jobnow.key x509 -in jobnow.csr -out jobnow.crt -req -signkey c:\jobnow.key -days 369when asked for common name type your ip address. Then i install import the certificate to certmgr.msc Restate Apache https//192.168.0.14 - Doesnt work 192.168.0.14 - Works fine Apache error log: [Wed Sep 10 12:05:41.299000 2014] [ssl:warn] [pid 7840:tid 260] AH01909: RSA certificate configured for localhost:80 does NOT include an ID which matches the server name [Wed Sep 10 12:05:41.301000 2014] [ssl:warn] [pid 7840:tid 260] AH01909: RSA certificate configured for 192.168.0.14:443 does NOT include an ID which matches the server name [Wed Sep 10 12:05:41.301000 2014] [ssl:warn] [pid 7840:tid 260] AH01915: Init: (localhost:80) You configured HTTPS(443) on the standard HTTP(80) port! [Wed Sep 10 12:05:41.373000 2014] [co warn] [pid 7840:tid 260] AH00098: pid file C:/xampp/apache/logs/httpd.pid overwritten -- Unclean shutdown of previous Apache run? [Wed Sep 10 12:05:41.616000 2014] [ssl:warn] [pid 7840:tid 260] AH01909: RSA certificate configured for localhost:80 does NOT include an ID which matches the server name [Wed Sep 10 12:05:41.617000 2014] [ssl:warn] [pid 7840:tid 260] AH01909: RSA certificate configured for 192.168.0.14:443 does NOT include an ID which matches the server name [Wed Sep 10 12:05:41.617000 2014] [ssl:warn] [pid 7840:tid 260] AH01915: Init: (localhost:80) You configured HTTPS(443) on the standard HTTP(80) port! [Wed Sep 10 12:05:41.659000 2014] [mpm_winnt:notice] [pid 7840:tid 260] AH00455: Apache/2.4.7 (Win32) OpenSSL/1.0.1e PHP/5.5.9 configured -- resuming normal operations [Wed Sep 10 12:05:41.659000 2014] [mpm_winnt:notice] [pid 7840:tid 260] AH00456: Apache Lounge VC11 Server built: Nov 21 2013 20:13:01 [Wed Sep 10 12:05:41.659000 2014] [co notice] [pid 7840:tid 260] AH00094: Command line: 'c:\\xampp\\apache\\bin\\httpd.exe -d C:/xampp/apache' [Wed Sep 10 12:05:41.661000 2014] [mpm_winnt:notice] [pid 7840:tid 260] AH00418: Parent: Created child process 7032 [Wed Sep 10 12:05:42.319000 2014] [ssl:warn] [pid 7032:tid 272] AH01909: RSA certificate configured for localhost:80 does NOT include an ID which matches the server name [Wed Sep 10 12:05:42.321000 2014] [ssl:warn] [pid 7032:tid 272] AH01909: RSA certificate configured for 192.168.0.14:443 does NOT include an ID which matches the server name [Wed Sep 10 12:05:42.321000 2014] [ssl:warn] [pid 7032:tid 272] AH01915: Init: (localhost:80) You configured HTTPS(443) on the standard HTTP(80) port! [Wed Sep 10 12:05:42.645000 2014] [ssl:warn] [pid 7032:tid 272] AH01909: RSA certificate configured for localhost:80 does NOT include an ID which matches the server name [Wed Sep 10 12:05:42.646000 2014] [ssl:warn] [pid 7032:tid 272] AH01909: RSA certificate configured for 192.168.0.14:443 does NOT include an ID which matches the server name [Wed Sep 10 12:05:42.646000 2014] [ssl:warn] [pid 7032:tid 272] AH01915: Init: (localhost:80) You configured HTTPS(443) on the standard HTTP(80) port! [Wed Sep 10 12:05:42.688000 2014] [mpm_winnt:notice] [pid 7032:tid 272] AH00354: Child: Starting 150 worker threads. [Wed Sep 10 12:05:54.589000 2014] [authz_co error] [pid 7032:tid 1652] [client 192.168.0.14:3112] AH01630: client denied by server configuration: C:/xampp/htdocs/ [Wed Sep 10 12:05:54.682000 2014] [authz_co error] [pid 7032:tid 1652] [client 192.168.0.14:3112] AH01630: client denied by server configuration: C:/xampp/htdocs/favicon.icoIt says my server name does not match, So i changed the server name to: ( httpd-ssl.conf ) around line 80 ServerName 192.168.0.14:443 DocumentRoot to my httpd.conf document root My .key is in apache/conf/ssl.key my crt is in apache/conf/ssl.crt I hope this helps someone else! i had to post this after how much trouble it was causing me! Okay, I am going to try to explain this the best I can, I appreciate and thank you for your help in advance! Okay, this is what I am wanting to do. I want to create a user area on my website. I don't need a common page that every user see's but each user to have there own unique page that they are brought to once they log-in, where they will have there own content that I will change and update often. As for the usernames and passwords, I will be creating these when needed and giving them to the corresponding user, so I am not in need of a registration option. I am needing assistance on how to setup the MySQL database and the PHP coding for this. Remember, I am going to need to be able to add new users w/ passwords when needed. Thanks for your help! Hello guys, im new here , hope i meet great and friendly people here. Anyway, i need some help with a new Post back setup and hope anyone here could help me. This old script work but have problem to put in the new post back, here is it. Code: [Select] include("includes.php"); $subid = $_REQUEST['subid']; $survey = $_REQUEST['survey']; $earn = $_REQUEST['earn']; $pdtshow = $_REQUEST['pdtshow']; //$query_getuserid = mysql_query("SELECT id from members WHERE username= '".$subid."'") or die(mysql_error()); //foreach(mysql_fetch_array($query_getuserid) as $userid); $query_checkRef = mysql_query("SELECT referral_ID from members WHERE username= '".$subid."'") or die(mysql_error()); foreach(mysql_fetch_array($query_checkRef) as $ref_id_user); if ($ref_id_user>=1) { mysql_query("UPDATE members SET points=points+".$pdtshow." WHERE username='".$subid."'"); mysql_query("UPDATE members SET completed_surveys=completed_surveys+1 WHERE username ='".$subid."'"); mysql_query("UPDATE members SET points=points+".$refer_points." WHERE id ='".$ref_id_user."'"); mysql_close(); echo "Success: ".$subid." earned ".$pdtshow." points\n and is referred by".$ref_id_user; }else { mysql_query("UPDATE members SET points=points+".$pdtshow." WHERE username='".$subid."'"); mysql_query("UPDATE members SET completed_surveys=completed_surveys+1 WHERE username ='".$subid."'"); mysql_close(); echo "Success: ".$subid." earned ".$pdtshow." points\n and is referred by nobody"; } ?> Here is the new postback i should insert. Code: [Select] cvid ip name status sid And it should seem like this: http://example.com/postback.php?txid=1234&ip=123.123.123.123&name=Unlocker+#1&status=1&sid=abc Can anyone help me out ? Maybe insert it for me and send it over to me -Trizocy I have been trying to setup a tasty igniter site but it seems i am having some real issues i go through the setup and the wizard says finalising site setup then i get a sql error on my screen "SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '1.0.0'' COLLATE utf8mb4_unicode_ci' at line 1 (SQL: ALTER TABLE ti_extensions CHANGE version version VARCHAR(32) DEFAULT ''1.0.0'' COLLATE utf8mb4_unicode_ci)" after googling this error the only info i can find is that the database collation has to be set to utf8mb4_unicode_ci so i have been into phpmyadmin and changed the collation to this setting but i still get this same error message and its getting frustrating can anyone throw me some help please and thanks in advance
Hi
I've been stuck trying to execute a script for a few weeks now and I really need help.
The script is supposed to schedule social media posts via functions.php and wp-load.php but I get errors.
Can someone do me a favour?
Drop your email and I'll send you the details to connect to my database.
Thanks
Ok im only new to PHP and Im trying to setup my own porfolio website using PHP,CSS,HTML5 and other bits. Iv downloaded WAMP and im tryin to get my website workin offline first. Well im just trying to get a section in my site in the top right corner for a login and register area similar to this website (membership section) iv bein following some online video tuts and completed them right but Im not sure how to integrate it into my existing home page,/ index.html page. I want to have it so that it says login or registered and it works through php. all the tuts I followed seem to have this done on one index.php page and im getting confused as to how I can have a small section on my home page just for registering if yano what I mean..... Maybe its a silly question....im still learning....Any help be gratefull I've got PHP setup on Ubuntu with MySQL. I've got sendmail installed but for some reason I can't get mail() to work. Does anyone have good guidelines for getting this setup properly? I've played around with CakePHP, then XCrud (a decent CRUD application) but I gave up on both of them, XCrud was great for everything up until it came to managing complicated relational database tables. Anyhow, I'm using wordpress a lot now cuz it lets me stop reinventing the wheel so much and although I was able to integrate XCrud into WordPress as a plugin, I think the best way to go is just transfer my database tables to WordPress tables and display them as custom post types. My time is really limited right now though, is there a plugin/set of plugins I can use to automate the process? To show you what I mean, heres the XCrud list display of one of the tables:
thats great because it automatically sets up the CRUD thing and lets you add and edit fields to the table, and doesn't heavily box you into their system but I have a table of plants, one for products, one for pharmacology, one for categories which are all related to each other, and some of them are structured in a tree/nested hierarchy structure so long story short, I need to do advanced searches based on these relations and handle these tree structured tables and CakePHP didn't work out, and XCrud has crappy documentation and isn't popular enough to find good info.
So how would you go about transfering this system to WordPress? I'm guessing I need to make custom post types for each table but what I don't yet know is how to transfer the DB tables to WordPress format, how to handle the relationships between each table and how to handle the hierarchical tree structures.
I'm creating a social network for a friend and I need to make a flash webcam to talk to another flash webcam. I have all the flash code working, now all I need is a way to let users match themselves up to each other without other users being able to barge in. What areas of php do I need to learn about to do this? Dallas. Been looking to see if anyone has published something like this. I have a number of projects coming up which entail creating input form pages using PHP. Some of these are quite large as to the number of entries, pages etc.. and the worst part is that I know in advance that they most likely will want to change/add to the form after I am done. So rather than coding them physically in the code, I want to define the form elements in an array that I can store in a database/flat file and when the page loads, read from the array to construct the form output. I don't have any issues with dealing with the database or even using arrays, but I have not been able to come up with an array setup that works. Has anyone done this and would care to share the structure they used. Everything that I find on the net is basically sites that want to host the form, but this will be in a non-Internet accessible site so that is not an option. Being fresh to PHP I installed PHPMailer (Not sure how to install classes so what I did is I dropped the PHPMailer files into my PEAR folder since that's where all my extensions are being sent to in XAMPP). Then I ran a basic script to send email via PHPMailer using the functions offered by PHPMailer instead of Mail() (of course) but when I do that and execute my code by going to localhost my Firefox will just display my PHP code right back at me. hello dear php-friends i currently work on a little parser project i have to find solutions for the a. fetching part b. parser part here we go - the target urls: see the overview: http://dms-schule.bildung.hessen.de/index.html http://dms-schule.bildung.hessen.de/suchen/suche_schul_db.html Search by pressing the button "type" and then choose all schools with the mouse! Results 2400 schools Here i can provide some "more help for getting the target!" - btw: see some details for this target-server: http://dms-schule.bildung.hessen.de/suchen/suche_schul_db.html?show_school=9009 http://dms-schule.bildung.hessen.de/suchen/suche_schul_db.html?show_school=9742 http://dms-schule.bildung.hessen.de/suchen/suche_schul_db.html?show_school=9871 well - you see i have to itterate over the sites - with a function /(a loop) http://dms-schule.bildung.hessen.de/suchen/suche_schul_db.html?show_school=1000 to 10000 BTW - after fetching the page i have to see which one are empty - those ones do not need to be parsed! Well - i want to do this with curl-multi since this is the most advanced way to do this: I see i have an array that can be filled -... but i have to think about the string-concatenation - i guess that i have make some sophisticated string concatenation. this one does not fit - for($i=1;$i<=$match[1];$i++) { $url = "http://www.example.com/page?page={$i}"; and besides this i have an array - i c an fill the array. can you help me how to run in a loop with <?php /************************************\ * Multi interface in PHP with curl * * Requires PHP 5.0, Apache 2.0 and * * Curl * ************************************* * Writen By Cyborg 19671897 * * Bugfixed by Jeremy Ellman * \***********************************/ $urls = array( "http://www.google.com/", "http://www.altavista.com/", "http://www.yahoo.com/" ); $mh = curl_multi_init(); foreach ($urls as $i => $url) { $conn[$i]=curl_init($url); curl_setopt($conn[$i],CURLOPT_RETURNTRANSFER,1);//return data as string curl_setopt($conn[$i],CURLOPT_FOLLOWLOCATION,1);//follow redirects curl_setopt($conn[$i],CURLOPT_MAXREDIRS,2);//maximum redirects curl_setopt($conn[$i],CURLOPT_CONNECTTIMEOUT,10);//timeout curl_multi_add_handle ($mh,$conn[$i]); } do { $n=curl_multi_exec($mh,$active); } while ($active); foreach ($urls as $i => $url) { $res[$i]=curl_multi_getcontent($conn[$i]); curl_multi_remove_handle($mh,$conn[$i]); curl_close($conn[$i]); } curl_multi_close($mh); print_r($res); ?> I was wondering if anyone knew of a good way to query domain name availability with php? Hi, I am trying to see if the domain name in the string is in an array. eg; Code: [Select] mystring='http://google.com/somethingelse'; myarray[]='google.com'; myarray[]='anotherdomain.com'; in this case return TRUE Code: [Select] mystring='http://phpfreaks.com/adir'; myarray[]='google.com'; myarray[]='anotherdomain.com'; in this case return FALSE How would I do this? Thanks, -mme |