Jump to content

requinix

Administrators
  • Posts

    15,229
  • Joined

  • Last visited

  • Days Won

    427

Everything posted by requinix

  1. The REMOTE_USER is a value that is populated for you if the user is set up to be authenticated through your web server. It is not. Nor is it likely what you should be using if you have to work with a database. You need a custom (potentially) mechanism to authenticate users against your database. That seems to mean using AuthManager.
  2. That is not what REMOTE_USER is for. Why do you think you are supposed to be using it?
  3. As far as I can tell, either you're asking how to do something you already know how to do, or you're asking how to do something I've already told you how to do.
  4. https://forums.phpfreaks.com/topic/312067-i-would-like-nice-url-link-how-change/
  5. People who disable cookies have a fundamentally broken internet experience. They're used to creating exceptions in their browser to allow sites to work. Remind people your site uses cookies - which you kinda "have" to do already, thanks to GDPR. Well that's the dumbest excuse I've heard all month.
  6. starting to run out of crystal balls here... header() redirects tell the browser to go to a different place than they first tried to go. It has nothing to do with transitions. If you want a transition between pages then what you do with header() is irrelevant. If you're having a problem with transitions not working, forget the header() and make them work normally first.
  7. But what about other pages? You'd have to add RewriteRules for every single one. Go back to the version you had just before this one and see if you can't fix it in a different way. A way that would allow you to use the same URL pattern for more than one page. You'll also have to deal with that white page, because even if you don't have a page like /foo, you at least need to make sure index_pl.php?src=foo doesn't crash in some bad way. First step is fixing all of your URLs so that you do not try to give people URLs like /index_pl.php?src=home. You have to change those yourself. It will not happen automatically, Apache will not scan through your HTML and fix your links for you.
  8. I didn't go any further than that. You can test it for yourself easily enough: grab a smartphone, get off your wifi, and browse to http://your-ip-address.
  9. Was I wrong? You said you have some problem with duplicate stuff, or code running too long, and your solution was not to deal with the duplicates or why the code isn't stopping but to do something else to sweep the actual problem under the carpet. Keep sweeping stuff under the carpet and you'll have a big pile of 💩. Do you need help identifying why there are duplicates, or why there's apparently too much stuff, or whatever the real problem is I kinda lost track?
  10. I doubt very much you've been "hacked" by anything, but I just confirmed you really do have port 80 open on your internet-facing machine so who knows, maybe some bot did? All I do know is that there is some important piece of information that you may or may not be aware of which would explain what's happening in a more technical way. Oh, and one more thing: exposing a web server on your personal machine to the internet when you (no offense, but) don't know how to tell whether you've been hacked by something is really not a smart idea. The safest course of action would be to wipe your computer, as well as anything that could have come in contact with it.
  11. requinix

    mr.

    http://www.catb.org/~esr/faqs/smart-questions.html
  12. So are you saying that you get a ERR_CONNECTION_REFUSED when you try to browse to a couple pages on your site but not for everything else? And everything in your browser's address bar looks correct, domain and path and all?
  13. If it's not loading on the page then you have to find out exactly why it's not loading on the page. Any errors in your browser's developer console?
  14. Basically, yes, but that's not what you posted. You posted #RewriteCond %{HTTP_HOST} !^www\. #RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L] I can assume that the # commenting was added by you and not what the host said to do, but the part where it checks if the domain is wrong and, if so, redirects to the same domain is less likely to be. I don't think so. In fact I'm not even sure [L] matters if you use [R].
  15. The non-www one does an infinite redirect. Except it works, yes. Like I said, there is no way for mod_rewrite to do (cond AND cond) OR cond. There is a way to do it all in one single RewriteRule, but it means more processing overhead. Besides, having two RedirectRules for two different reasons makes sense: one of them handles non-www domains, one of them handles https. Yeah, it would be nice to combine both, but it doesn't actually matter.
  16. I don't know where you're getting that button stuff from. Refreshing a page starts everything over from the beginning. A page won't interfere with a future version of itself unless someone writes code specifically designed to do that. You say it appears after a refresh. That sounds like you're saying that it is now appearing every time. What precisely is it that you do and don't do when the page works and does not work?
  17. Did you check if Apache is running? And keep in mind that every device directly connected to the internet is going to be probed by various entities across the internet. Make sure you keep all your software up to date with the latest patches.
  18. A white screen means your PHP code broke. Look in your server error logs to find a reason why. Also, when you tried going to /home, did you watch what happened in the address bar? You saw it change, right? Did you pay close attention to what the new URL was? As for those links, the solution is to fix them. Don't write index_pl.php?src=home. Do write /home.
  19. I may be old, but last I knew phpBB and vBulletin were still the two reigning kings of free, traditional-style PHP forum platforms. But are you sure you want a forum? For an ecommerce site? Maybe what you need instead is some form of product discussion capability? Disqus is something I see in a variety of places. Not free, but cheap, and if the shop can't afford $9 a month then it's not profitable enough to survive in the first place.
  20. Arbitrarily capping the number of links is not going to solve whatever problem is causing the code to run when it should have stopped. You need to find out exactly what the problem is so you can fix that.
  21. If that's exactly what your host suggested then it's wrong. If the problem is the unnecessary redirect, what if I told you there is only one redirect (if done correctly)? RewriteCond %{HTTP_HOST} !=www.domain.com RewriteRule (.*) https://www.domain.com%{REQUEST_URI} [R=301,L] RewriteCond %{HTTPS} off RewriteCond %{HTTP:X-Forwarded-Proto} !https RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L] That's slightly modified from other versions because today is an odd-numbered weekday.
  22. Moved. This sounds rather unusual. Are you sure that's how it goes? You are definitely logged out because if you refresh the page you are indeed logged out, you click the Sign In at the top right and get the popup, you enter your information, it says the username/password is wrong, you refresh the page, and you're logged in? You followed those exact steps?
  23. It's not possible to do that. What are the conditions? There might be a way to alter them to work without "parentheses".
  24. Apache does not fix your long URLs to be short. What it does is allow you to use short ones. In other words, you're thinking about URL rewriting backwards: short URL goes into the browser, long URL is what runs on the server. So go to /home and see what happens. Spoiler: it won't work. 1. Try adding an [R] flag to both of those RewriteRules so you can see what is happening. 2. RewriteConds only affect the single next RewriteRule. If you want them to apply to two RewriteRules then you need to use two copies of them.
  25. Fix the RewriteConds so they're on separate lines and fix the RewriteRules to use the correct rewrite destinations according to the "long" URLs you want.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.