Hi there, I was wondering if someone could help, I am on one and one internet and i have trouble with Rewriterules. I have solved almost all of them by lookin online but i have just a couple of errors to solve.
On my site a couple of links to other pages do not work they are, Write a review, Terms and conditions and Privacy Policy, the links are on this page http://holiday-rentals-villas-cottages.co.uk/1002
1and1 are blaming my designer and my designer is blaming them. Up until now it has all been 1and1 internets fault. my .htaccess file go’s like this,
You’re not using Alias or AliasMatch, so you don’t need RewriteBase / – drop it
It looks like properties are always identified by numbers, like domain/1001, domain/1002, domain/review/1001, domain/review/1002. Is this always true? If so, change all the occurences of ([a-zA-Z0-9_-]+) to ([0-9]+). There’s no sense to go looking for alpha characters if you’re sure there’ll never be one.
Put [L] after all your rules to prevent Apache from burning CPU cycles for nothing
Actually, some hosts do demand that you use RewriteBase (I was with one once, a free host). I wrote a script once that used mod_rewrite and someone who was with 1and1 told me some problems they had were due to not having RewriteBase in there, so it may be necessary for you.
I tried the above and no success so i put the .htaccess file back as it was as i was getting even more errors. I forgot to mention, I know nothing about rewriterules or any programming, I have been looking on forums for solutions, from what i have seen, 1and1 internet seem to have a lot of issues with rewrite rules.
I just received an email from 1and1 saying,
The reason why it shows error 404 because the subdirectory pages does not exist in Znprs directory where your domain name is currently pointed. Please double check your files.
This problem was worse when i started but slowly getting better, does anyone else have any ideas???
Without the RewriteBase / it does not work so it must be needed with 1and1
My designer said they are fine but how would i tell?
It must be 1and1 because I cant use my wordpress theme without adding the line, AddType x-mapp-php5 .php
The designer said the script was designed to work with PHP5 and above, 1and1 has 4.9.
Also I added some forward slash and backslashes to the rewrite rules which i found on another forum, this helped me to view more pages as at the begining I could only see a few pages. The site is almost fully operational apart from these 3 problems.
The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator, webadmin@kundenserver.de and inform them of the time the error occurred, and anything you might have done that may have caused the error.
More information about this error may be available in the server error log.
Additionally, a 500 Internal Server Error error was encountered while trying to use an ErrorDocument to handle the request.
Very weird. It works fine on my local system here.
Could you remove line by line and test if it works in between each time? i.e. remove the last line, load the website to see if it works, if not remove the line before the last line, load the website, etc, etc.
That will show which line is causing the error.
I did just spot some extraneous backslashes. It won’t solve the problem, but it will look better cleaner:
The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator, webadmin@kundenserver.de and inform them of the time the error occurred, and anything you might have done that may have caused the error.
More information about this error may be available in the server error log.
Additionally, a 500 Internal Server Error error was encountered while trying to use an ErrorDocument to handle the request.
I pasted the whole lot in and got the server error, I did not try line by line. I put the extra slashes on as I see a post about 1and1 trouble on another site and it got more of the site working. gonna try your recommendation now.
This links in the footer dont work - Terms and Conditions - getting 404
This links in the footer dont work - Privacy Policy - getting 404
And on a property page - write a review dont work. getting 404
Yesterday I Contacted 1an1 about these issues this is what they said,
Thank you for contacting us.
The reason why it shows error 404 because the subdirectory pages does not exist in Znprs directory where your domain name is currently pointed. Please double check your files.
For the pages you do need to accept alpha characters. My last idea to is move the first rewriterule last. While it shouldn’t be needed, it is a bit more clear.
Thanks for all your help, I will contact them tomorrow, I have noticed some of the php has been encrypted, I found a decrypter online over the weekend but could not get it to work, as i cant see the files they could be corrupted, Thanks again, regards steven.
Hi there, me again, i was wondering if i could pick your brains?
I moved the site to another webhost provider now the site is working, i even used the modified htaccess file you provided. Is there a way of speeding up the site through the htaccess file or removing whitespace from the html,
thanks in advance, regards Steven.
PS if you have any plumbing/property maintenance issues I can help you with them.