Re: Redirect non-www to www cons? Digital Media Digital Marketing Search Engine Strategies by Read a Book …=([^&]+)&product_id=([^&]+) RewriteRule ^product/index\.php$ /product/%1/%2/%3? [L,R=301] RewriteRule ^product/([^/]+)/([^/]+)/([^/]+)/?$ product/index.php?mainCategory… Re: Redirect non-www to www cons? Digital Media Digital Marketing Search Engine Strategies by Read a Book > Make sure that every page has the correct link rel=canonical Where should i place this tag ? > Ensure there are no internal links anywhere in your site that use this wrong version of the URL. I ensured and updated the search.php file which was redirecting to `non-www` version, now is fine. > Ideally, implement 301 … Re: How to disable the automatic swipe effect on the product page? Programming Web Development by Dani …: { slidesPerView: 1.2, spaceBetween: 15, },…{ slidesPerView: "2", spaceBetween: 0, grid: { rows: 2, }, autoplay: {… Re: Redirect non-www to www cons? Digital Media Digital Marketing Search Engine Strategies by Read a Book I was about to ask next about the `Google Search Console` whether i should make new property with `www` or not. So now i made the new property, should i delete the old one, or just leave it like it is? Google wont get confused on which property should crawl? I will also make a dynamic sitemap that is generated with PHP with the `www` in the … Re: Redirect non-www to www cons? Digital Media Digital Marketing Search Engine Strategies by Read a Book I just updated the canonical url structure format into Cyrillic characters. $canonical_product_url = "https://" . $_SERVER['HTTP_HOST'] . "/product/$mainCategory/$productName/$productID"; $product_url = "https://" . $_SERVER['HTTP_HOST'] . "/product/" . urlencode($mainCategory) . "/"… Re: AirTM API: How to Build a Form? Programming Web Development by pritaeas You cannot safely use a form to post directly to AirTM. Post to your own PHP script, which can then use curl to make the request, including headers. Re: AirTM API: How to Build a Form? Programming Web Development by Dani I can see that the URL that you linked me to has 4 steps to create a purchase. The first one is to create a Purchase via an HTTP POST request. That can be done with a cURL request. cURL requests require some backend programming such as via PHP or some other language. Are you using a server-side language to write your web app? If so, which one so… Online subission forms not sending emails of submitted info Programming Web Development by david.tigner … received. Last on line submission form I received was on 2/6/2024. No coding was changed at all, just nothing… Re: Online subission forms not sending emails of submitted info Programming Web Development by Biiim …); var_dump($tmp); I had a problem around a year or 2 ago with the basic mail function not working correctly and… Re: Online subission forms not sending emails of submitted info Programming Web Development by Dani I wonder if the problem is that your php mail() function is configured to use SMTP in your php.ini file. A lot of SMTP servers switched over the past year or so to using XOAuth2 for authentication. A username + password in your config settings will no longer suffice to establish a connection. You can see me complaining about it [here](https://www.… Re: Online subission forms not sending emails of submitted info Programming Web Development by david.tigner I do not have access to the PHP error log nor do I know how to check to see if mail() is returning false. The coding I'm using has worked (e.g. sent email with submitted info) for 13 years and now stopped working. My URL/PHP provider, Ionos, claims it won't send because all recipient email addresses need to be authenticated and a new STMP PHPmailer… Re: Online subission forms not sending emails of submitted info Programming Web Development by Dani The first thing I will say is never output `$_POST[]` content directly into the HTML without escaping it first. You are leaving yourself wide open to an HTML injection attack. Not only that, but you're also leaving yourself open to invalid HTML. All it takes is to wrap your user-sent variables with htmlspecialchars to make sure they're HTML-escaped… Re: Online subission forms not sending emails of submitted info Programming Web Development by david.tigner Re: Biiim's post, the coding you suggest to get error messages looks like something good to try and the PHP Mailer stuff looks the same as the generic code I got from Ionos. It sounds like all these methods are appearing favorable for solving the problem. This kind of troubleshooting can be very frustrating so thanks for your help. Re: Add property to standard object Programming Web Development by Dani > $obj->newProperty = "something"; For some reason I thought that PHP didn't allow that without throwing an error?! (Hence the reason for me posting this question). I'm on PHP 8.2/8.3. Add property to standard object Programming Web Development by Dani I, very hackily, create an object of type stdClass as so: $arr = array( 'foo' => 'bar', 'baz' => 'bat' ); $obj = json_decode(json_encode($arr)); How can I now quickly add a third property to $obj without PHP getting angry? Re: What's up with XOAuth? Programming Web Development by toneewa Maybe you were thinking of something like this: <?php // Include PHPMailer-BMH library require 'vendor/autoload.php'; // Adjust the path as needed // Create a new BounceMailHandler instance $bmh = new \voku\BounceMailHandler\BounceMailHandler(); // Set up Office 365 SMTP settings $bmh->… What's up with XOAuth? Programming Web Development by Dani What was wrong with good ole using SMTP? Has anyone here successfully used an XOAuth library for PHP? Specifically, I'm looking to connect to my Office 365 mailbox. Re: What's up with XOAuth? Programming Web Development by pritaeas I have not used this with PHP, but are you connecting to the Graph API or EWS? Re: What's up with XOAuth? Programming Web Development by pritaeas Correct, you can also use the MS Graph API to use SMTP, if you cannot get that lib of yours to work. E.g. https://github.com/microsoftgraph/msgraph-sdk-php Re: What's up with XOAuth? Programming Web Development by Dani For my particular use case, I use a PHP library called [Bounce Mail Handler](https://github.com/voku/PHPMailer-BMH) (formerly PHPMailer-BMH) that was last updated in 2019. It connects to the email server via SMTP using a username and password. I am trying to do the least amount of work possible to modify this library to connect via SMTP using … Re: What's up with XOAuth? Programming Web Development by toneewa [Setting up phpmailer-office-smtp](https://stackoverflow.com/questions/24947434/setting-up-phpmailer-with-office365-smtp) [PhpMailer example](https://github.com/voku/PHPMailer-BMH/blob/master/examples/index.php) Maybe these will help. Re: Htaccess Problem Url Friendly Programming Web Development by Adolfo_1 I apologize because I am unclear. Difference between readlex and read_lex is my mistake Your htaccess example is right except that it doesn't work for me and I don't understand. Summary: In <head> I have this php: define("BASE_URL", "http://localhost/mysite/"); if($mod_rewrite == 'Off') { … Htaccess Problem Url Friendly Programming Web Development by Adolfo_1 I have problem with this htaccess in STATIC URL RewriteEngine On RewriteRule ^readlex/(.*)$/?$ readlex.php?slug=$1 [NC,L] **DINAMIC URL** work fine only with defined CONSTANT: Example <a href="<?php echo BASE_URL.READ_LEX ?>Le-mura-di-Lucca">Lucca</a> Result = localhost/mysite/… Re: Htaccess Problem Url Friendly Programming Web Development by Dani I apologize that I still am misunderstanding you. I'm confused what you mean by "example from database", because it seems your question is about htaccess and PHP. I'm confused what is being retrieved from the database In your second example, what are the values of BASE_URL and READ_LEX? Additionally, your .htaccess file said … Re: Htaccess Problem Url Friendly Programming Web Development by Adolfo_1 > Where do you set the value of $mod_rewrite? I set On-Off $mod_rewrite in database from Dashboard Admin. Now is always ON. > Again, where do you set the values for BASE_URL? In Admin config.php // Defining base url define("BASE_URL", "http://localhost/mysite/"); > What do you mean by '… Re: Htaccess Problem Url Friendly Programming Web Development by Adolfo_1 NO! I meant that URL loads but not friendly I have to put these STATIC URLs inside the text retrieved from the database as I cannot insert php strings. Example from database example that htaccess makes unfriendly : <em><a href="../read-lex.php?slug=Provvedimento-di-sospensione-Trib-Cagliari">Vedi &nbsp;SENTENZA&… Re: Htaccess Problem Url Friendly Programming Web Development by Dani > In <head> I have this php: I see you have on line 3 `if($mod_rewrite == 'Off') {`. Where do you set the value of `$mod_rewrite`? How do you tell if it's Off or On? > Which I then recall in this link and htaccess works fine: Again, where do you set the values for `BASE_URL`? > The same link without Constant PHP: What … Re: Htaccess Problem Url Friendly Programming Web Development by Adolfo_1 I expressed it badly. They are both dynamics. But: href="<?php echo BASE_URL.READ_LEX ?>Provvedimento-di-sospensione-Trib-Cagliari" // result = localhost/mysite/readlex/Provvedimento-di-sospensione-Trib-Cagliari href="localhost/mysite/readlex.php?slug=Provvedimento-di-sospensione-Trib-Cagliari" // … Re: Htaccess Problem Url Friendly Programming Web Development by Adolfo_1 Solved the problem with this htaccess in mode rewrite ON But I don't understand why. I have to enter friendly url directly href="<?php echo BASE_URL.READ_LEX ?>Provvedimento-di-sospensione-Trib-Cagliari" // OK result = localhost/mysite/readlex/Provvedimento-di-sospensione-Trib-Cagliari href="… Re: Htaccess Problem Url Friendly Programming Web Development by Dani I suppose I’m not properly understanding your question. Do you mean when you go to the URL in your browser localhost/mysite/readlex.php?slug=Le-mura-di-Lucca it doesn’t load, but when you go to the rewritten URL it works fine?