Jump to content

real_illusions

Members
  • Content Count

    1,273
  • Joined

  • Last visited

Everything posted by real_illusions

  1. The domain A records were changed, but were changed back again. I've looked into those search results (or similar) but not found anything solid that relates to this situation. I'm not aware of any rewrite rules on the server, its a windows server. I dont have access to it though, but I do have a contact for someone who does have access to it.
  2. I have a strange problem (not personally, but a website has a problem...)....anyway. Quick history lesson.1. Build a new website for a client.2. Initially was going to change hosting, and had the A records changed on their DNS records.3. Didn't go to plan due to security issues surrounding the A records and adding a domain to a new server solely on A records. DNS was reverted after 2-3 days downtime.4. New site uploaded onto old/current server. New home page is index.php, which didn't exist on previous site (as it was using index.htm or something else). Now, here where it gets a bit complicate
  3. Ah, that was it, the - missing in the expression. Always something so simple you overlook and then someone else points it out and you feel like an idiot. Thanks
  4. Hi all, I have a rule setup thats similiar to another that works, but this one doesn't, and I cant work out why. Rule is as follows: RewriteRule ^latestnews-([a-zA-Z]+)/?$ newsitem.php?item=$1 [NC,L] Where the ending variable is used to get a database item, and thus displays the right content on the page, and is also displayed in the friendly URL. For example: /newsitem.php?item=newsitem-goes-here would appear as: /latestnews-newsitem-goes-here But instead, I get a 404 error. Now, I have a similiar setup on another page but that uses PHP switch statements to determine the content as the amoun
  5. Woo, finally, it works! It was the slash that was the problem. Thanks
  6. Have put in example.co.uk instead of the actual URL, and replaced a couple of page file names, and xx'd out the IP address that was causing problems. <Files .htaccess>order allow,denydeny from all</Files> ErrorDocument 400 /error400.phpErrorDocument 401 /error401.phpErrorDocument 403 /error403.phpErrorDocument 404 /error404.phpErrorDocument 500 /error500.php DirectoryIndex index.php RewriteEngine onRewriteCond %{HTTP_REFERER} !^$RewriteCond %{HTTP_REFERER} !^http://(www\.)?example.co.uk/.*$ [NC]RewriteRule \.(gif|jpg)$ http://www.example.co.uk/dontsteal.gif [R] redirect 301 /ol
  7. Other rules are working on the server (like non-www to www). Have taken off any [L]'s on other rules as that indicates its the last rule I believe, and still no joy.
  8. Oh yes, forgot about that. But still nothing when adding in the a-z part. Have tried removing the '+' bit but again, 404 error. Same with removing the /?, or even just ? or /, all 404 errors.
  9. I have this: RewriteRule ^/([A-Z]+)/?$ location.php?area=$1 [NC,L] Which doesn't create a 500 server error, but I still 404's when trying to access /areagoeshere for example. The underlying url is location.php?area=areagoeshere Why is it doing this?
  10. Cant make it do what I want it to. Found a few online generators but none seem to either do the trick I want or the code they product doesn't work. It doesn't produce a 500 error, it just produces a 404 error on the friendly url. Stuff like:RewriteRule /(.*) /page.php?page=$1 [PT] Even hard coding it this way doesnt work: RewriteRule ^/Something$ page.php?variable=Something And yes Rewrite Engine is on.
  11. Hi, If I have a page URL like this: example.com/page.php?variable=somethingexample.com/page.php?variable=something-goes-here Then how do I get it to show example.com/somethingorexample.com/something-goes-here via .htaccess? And would it still work? As in, would the browser pickup the variable and display the right content? Or is there a better way of doing this? Thanks.
  12. Hi,I've found the if_home and if_front_page to be potentially useful..but..also found that it causes problems.Current setup is that in the index.php file I have some static content followed by the list of blog posts, limited to only 1.When clicking on "older posts", it goes to /page/2/ as the URL, but its basically a repost of the home page.I then did this:<?phpif ( is_front_page() ) {query_posts('showposts=1');} else {query_posts('showposts=10');}?>And also surrounded the static content in a similiar way<?phpif ( is_front_page() ) {// static content} else {// nothing at all}?>I al
  13. It was all valid HTML when I did the input inside a label...although if the name attribute is required, but still valid HTML? Hmm..will have to see about that. Are the W3 saying that the input is valid without a name attribute, but yet its required for processing the form...interesting...
  14. Hmm..why is it a bad idea?Anyway...I would need the 2 lowest removed (so to speak) and the rest totalled up.Will see how those 2 queries work...
  15. Ah crap..how stupid do i look Thanks
  16. Hi all,I have a form which doesn't like sending the values of the input fields.I cant really show you the page with the HTML code as its a private project I'm working on.However, the PHP script I've used several times before, and although I've modified it to suit the form values this time around...nothing else has changed.Here is an example of one input value:<label for="firstname">First Name:<input type="text" id="firstname" value="" /></label>The form is <form method="post" action="test.php">and in test.php is simply var_dump( $_POST ); to find out whats been sent.Bas
  17. Hi all,Is there an easy to way to add up all the numbers from a database but to discard the lowest?Each number is in its seperate field along with a name, for instance:Name 3 5 9 2 6 7Where I need to add them all up but discard the '2' as its the lowest number.Thanks
  18. Thats it. That was causing it.Seems to work ok now. Thanks
  19. It must be something to do with $_POST['discountcode'] in the codecheck.php, but as that file is called up via JS, how do I check what that variable is? Echoing it out breaks the script.If its not getting the value correctly..then how do I go about doing that?
  20. Hi,I'm trying to make a code checker, based from a username checker (hence the username variables and such)..but it wont seem to work. Whatever I put into the input field, I get "xxxx is not Available", even when it is.So,I have this, all these are on a webpage built into a form, and header includes and everything, but these are the relevant parts. I cant work out why its not reading whats in the array. Eventually, I will have the array populated from a MySQL database, and I swear this was working last night..but now it isn't....and have no idea why. Any clues?HTML (within a bigger form): <
  21. Thanks, have figured out a solution.Its not too elegant as it does call the database a few times via the select statement to different tables, but it does the trick and seems to be the easiest to display whats needed.
  22. Hi,Would like some advice on the best way to achieve this.I have a bunch of data in the database, a number associated with a set name (out of a few choices).Now, for each name, I need to display the top 2 numbers (the 2 highest numbers).I could do a select statement for each name, but then that'll involve several calls to the database, which while it isn't the greatest sin in the world, its not exactly the greatest way of coding.I've been thinking of getting all the data, and making an array, and then for each name, sort the array by the 2 highest number.Does that make any sense?
  23. Thanks for your help.Have got it sorted and intergrated into sending an email with the relevant information now, in the right places.
  24. I'm just as confused now as I was to begin with...
×
×
  • Create New...