Jump to content

requinix

Administrators
  • Posts

    15,274
  • Joined

  • Last visited

  • Days Won

    432

Everything posted by requinix

  1. 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.
  2. 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.
  3. 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?
  4. 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.
  5. requinix

    mr.

    http://www.catb.org/~esr/faqs/smart-questions.html
  6. 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?
  7. 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?
  8. 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].
  9. 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.
  10. 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?
  11. 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.
  12. 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.
  13. 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.
  14. 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.
  15. 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.
  16. 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?
  17. It's not possible to do that. What are the conditions? There might be a way to alter them to work without "parentheses".
  18. 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.
  19. 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.
  20. Fixed: it was set up for the Dark theme but not the Light theme. Also checked the other custom CSS rules, but besides a small underline thing, there weren't any other rules (not related to coloring) that Dark had but Light was missing. However, it's possible/probable there are some HTML template differences.
  21. What's your question? If there's a way to not have to copy and paste so much code?
  22. I really don't get the impression that you're reading my replies. They both told you that GROUP BY wasn't the answer, and the second one told you not one but actually two different methods to get the information you need (one probably more useful than the other).
  23. I'll rephrase what I said: GROUP BY is for grouping multiple rows together into one row. Like, say, "group all of the records together and give me one row that counts how many there were". So let's say you fix the query so that it returns the ID and which column it was that didn't have the value. And say you get both sets of results combined into one query. Duplicate IDs are going to show up twice. How would you end up processing those records? You'll show the user once as not having a firstname, then somewhere else later you'll show the same user again as not having a lastname. Wouldn't it be better for the person looking at this page to see the ID and that both fields were empty? Which means now you should come up with a query that shows the ID and indicates the firstname if it's empty as well as the lastname if it's empty. And the condition for a user to show up in this new list is the same as before but slightly different: the firstname is empty or the lastname is empty. And you know an easy way to indicate whether the firstname or lastname is empty? By returning the value of the field and literally checking if it's empty. All that leaves you with SELECT id, firstname, lastname FROM table WHERE firstname = '' OR lastname = ''
  24. GROUP BY is for grouping multiple rows together. That's not quite what you want to do here, is it? What you want is possible, and rather easily, but first a question: when you read back the rows from this single query, how are you going to know whether each one is showing you an empty firstname or an empty lastname? (Does the distinction matter?) And note that there's no point returning the firstname or lastname because you already know what they're all going to say: they'll be empty strings.
  25. It can be whatever, as long as stuff exists in the way it needs to exist at the moment it needs to exist. So you can getElementById a variable, sure, but the thing you're trying to find has to be on the page - not just sitting in a variable you got from AJAX.
×
×
  • 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.