Jump to content

Daniel0

Staff Alumni
  • Posts

    11,885
  • Joined

  • Last visited

Everything posted by Daniel0

  1. I suppose you could use some javascript to send them somewhere. You shouldn't rely on that though. Normally, it's one action for one form.
  2. Make all the domains' DNS A records point to the same machine. Setup a vhost in Apache and have ServerName be mywebsite.com and ServerAlias be the other domains. You can then in your application check which site it is based on SERVER_NAME ($_SERVER['SERVER_NAME']) and theme it accordingly.
  3. Well, nrg_alpha's pattern is better because it won't result in empty backreferences. Also, the ^ and $ means "match start of string" and "match end of string", respectively, so you cannot have that. You could remove those meta-characters.
  4. Benchmark that allows you to compare your site to similar sites. Traffic sources.
  5. Try this: ^(?:\((\d{3})\) |(\d{3})-)(\d{3})-(\d{4})$ It'll match both 123-456-7890 and (123) 456-7890
  6. <input type="hidden" name="return" value="http://www.example.com/thanks.html"> <input type="hidden" name="cancel_return" value="http://www.example.com/donate.html"> Should do it.
  7. Not with PHP, but with Javascript. You can use the onmouseover event to override the status bar contents.
  8. Daniel0

    new to php

    You should buy books that deal with theory rather than syntax. You can get the latter from the PHP manual and is, in fact, pretty simple. As an analogy, I can write a lot of sentences, but that doesn't mean I'm a good writer.
  9. Hmm... change. I don't remember any change being made. It must've been when I cleared the old post based ranks then. Edit: I just looked at the dev server which has an earlier dump of the database. The limits were: 0-9 posts: 5 PMs 10-49: 10 PMs 50-99: 20 PMs 100+: unlimited I've lifted the limit here. There is no point in restricting it and we've got plenty of space for all your PMs.
  10. Yeah, asking them if you can use .htaccess files and if the mod_rewrite Apache module is enabled would be a good idea.
  11. I don't know. Have you checked that you've enabled the rewrite module? Are you sure you named the file correctly (i.e. .htaccess)? Have you set AllowOverride all in your httpd.conf to make it possible to use .htaccess files?
  12. Yes, he did, but apparently there was also a max limit on how many PMs you can store.
  13. I don't like SMF's SSI.php. I think it's poorly written, it clutters up the global namespace and it messes with the superglobals. In other words, you cannot implement it in your site, your have to implement your site in that. If you decide to move away from SMF at one point and you've based your site around SSI.php then you're screwed.
  14. Hmm... I didn't know about that. I upped it to 100.
  15. The rule is how it should be. I think you are using reverse terminology so to speak Doing it the other way around wouldn't make sense.
  16. Uhm... when I mention the two URLs http://www.myweb.com/detail/id/234 and http://www.myweb.com/detail.php?id=234 then http://www.myweb.com/detail/id/234 will be the former whereas http://www.myweb.com/detail.php?id=234 will be the latter. See: http://dictionary.reference.com/browse/former (no. 4) and http://dictionary.reference.com/browse/latter (no. 1) When you have the rule: RewriteRule ^detail/id/(.*)/?$ detail.php?id=$1 Then any URL that matches the regex pattern ^detail/id/(.*)/?$ will be rewritten (you could call it forwarding without changing the URL) to detail.php?id=$1. You might want to check out the following things: http://httpd.apache.org/docs/2.2/rewrite/ http://httpd.apache.org/docs/2.2/mod/mod_rewrite.html Also, basic knowledge of regex (regular expressions) is required as it's what the rewriting rules are essentially based on. In your example, ^detail/id/(.*)/?$ means: The things in parentheses will be stored in back references (.*) and is accessed via e.g. $1 later.
  17. I guess you'll have to take that up with your host then.
  18. No, you should just use the rule I wrote. Then you should go to the former URL and it should act as though it was the latter.
  19. I think you've misunderstood it... Your rewrite will make http://www.myweb.com/detail/id/234 act as though it was in fact http://www.myweb.com/detail.php?id=234, so if you enter the latter URL then that's what you'll see. Also, you can make a slight optimization in your rewrites: Instead of having RewriteRule ^detail/id/(.*)/ detail.php?id=$1 RewriteRule ^detail/id/(.*) detail.php?id=$1 then you can just have RewriteRule ^detail/id/(.*)/?$ detail.php?id=$1 The question mark makes the preceding character optional, and the dollar sign matches "end of line". I'll also move this to the Apache mod_rewrite board seeing as it's not SEO you have trouble with, but rather configuring Apache.
  20. You needn't worry about that. When using Apache there are two ways you can run PHP: as a module or as CGI. See: http://php.net/manual/en/install.unix.commandline.php and http://php.net/manual/en/security.cgi-bin.php
  21. You can use an external SMTP server just fine. Just change the relevant settings in php.ini.
  22. Add ServerAlias mywebsite.org to www.mywebsite.org's vhost.
  23. Ask the owner of the robot then?
  24. I'm sorry, that doesn't make sense. You don't want to disallow all, but you want to keep a list of all robots and put it in there? That's essentially the same thing. Just use whitelisting. Disallow all, but allow a few you want.
  25. You could just do User-agent: * instead.
×
×
  • 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.