Results 1 to 6 of 6
Hi to everyone. I got an Apache configuration problem that is sending me mad. I mean absolutly mad!!!!!!! Ok I've set up a test web server for some of the ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 06-19-2008 #1
apache, .htaccess, mod_rewrite, I hate you all
Hi to everyone.
I got an Apache configuration problem that is sending me mad. I mean absolutly mad!!!!!!!
Ok I've set up a test web server for some of the guys at work and I'm struggling to get everything working. The problem being .htaccess and more
specifically the ability to rewrite URL's using mod_rewrite. I used SuSE 10.3 which by default doesn't include the module necesary but I've
seen to that and according to the php test page its loaded as a module so it should just be a case of enabling .htaccess in httpd.conf right??
I know the .htaccess file is good because the website works fine online so its purely a config issue on our machine here.
I've googled the problem to death and have now got to the point where I'm doubting my own name, never mind my configuration!!!
Can anybody give me some advice on how to get this working, how to configure my httpd.conf file. Do I need to make entries in other config files?
Here's the business end of my httpd.conf. At this point I doubt its correct.
# forbid access to the entire filesystem by default <Directory /> Options AllowOverride None Order deny,allow Deny from all </Directory> <Directory "/srv/www/htdocs"> AllowOverride all Order deny,allow </Directory> # use .htaccess files for overriding, AccessFileName .htaccess # and never show them <Files ~ "^\.ht"> Order allow,deny Deny from all </Files>
When I look through the apache errors i get "script '/srv/www/htdocs/mysite/blahblahblah.php' not found or unable to stat"
I'm close to insanity here so can anybody point me in the right direction" I didn't know it was a picture of his wife! I thought it was a publicity shot form Planet Of the Apes."
- 06-21-2008 #2
- 06-27-2008 #3Does your test site work without the .htaccess?
What have you already tried?
Can you post your .htaccess?
Options +FollowSymlinks RewriteEngine on RewriteRule ^mortgage_details_other_(.*).php$ mortgage_details_other.php?country=$1 RewriteRule ^mortgages_country_(.*).php$ mortgages_country.php?country=$1" I didn't know it was a picture of his wife! I thought it was a publicity shot form Planet Of the Apes."
- 06-27-2008 #4
I'm not really an expert in .htaccess myself. I tend to have varying success
Options +FollowSymLinks RewriteEngine On RewriteBase / RewriteRule mortgage_details_other_(.*).php$ mortgage_details_other.php?country=$1 RewriteRule mortgages_country_(.*).php$ mortgages_country.php?country=$1
- 06-27-2008 #5
Nope, no change
Any other ideas?" I didn't know it was a picture of his wife! I thought it was a publicity shot form Planet Of the Apes."
- 07-03-2008 #6
Ok. This is one of those "this is how I solved my problem" replies.
Like I suspected it wasn't very difficult, it just came down to something I didn't know which is specific to SuSE.
To get mod_rewrite working all I had to do was to make a change in the default-server.conf, setting AllowOverwrite to All. I'd been tearing my hair out making changes to /etc/apache2/httpd.conf as I'd already made this change there too. I dont know if you need to make this change in both files or just in default-server.conf but rewriting now works on my system .............pheww