I am pulling my hair out. I am trying to enable SEF URLs for my Drupal site. I have read all the forums, contacted my web host and successfully proved mod_rewrite is installed and working.
I uploaded .htaccess file to the root of my webserver.
RewriteEngine On
RewriteRule ^test.html$ /test2.html [R=301]
I created file test.html and test2.html and then I fired up firefox and went to www.mysite.com/test.html and it routed me to test2.html, Success mod_rewrite is working no?
I then uploaded the default .htacess file to the root of www.mysite.com and went to administer/settings and poked Clean URLS - enable and saved. I then got this message. "It appears your host is not configured correctly for Clean URLs. Please check for ModRewrite support with your administrator."
Man, I can't figure this out.
Comments
Same problem yesterday... My solution.
I was not able to reproduct the error on another site, but I ended up getting everything working by uncommenting the rewrite base and making sure it was set to /. Good luck!
Matt Walston
Fixed!!!
Thank you Matt.
That was the ticket, uncomment rewritebase and add "/"
RewriteBase /
Still some hair left.
Why did we have to do this?
Filing issue, drupal and apache version?
What is your drupal and apache versions?
Matt Walston
Rewritebase
About Rewritebase & mod_rewrite:
From the mod_rewrite docs.
(edit: link)
--
Tips for posting to the forums.
When your problem is solved, please post a follow-up to the thread you started.
Makes a lot of since, thanks... but
That explains the problem, but why should the .htaccess be broken for most people be default, why not just uncomment one line in the example? Should this be changed for next version?
Matt Walston
Data
Do you have data that shows .htaccess is 'broken' for most people or is this an assumption you make?
--
Tips for posting to the forums.
When your problem is solved, please post a follow-up to the thread you started.
Not broken, just not the optimum default
Would it not have the same out of box functionality if it set the base to / that if it was left unset? I know very little about mod_rewrite, but it should improve support if it was set to / by default. I know it took me an hour of fooling around to fix yesterday, and I have probably done 50+ installs of drupal as the / of a site. Yesterday was the first problem, even with server in identical config, literally, just coppied and renamed a new name based virtual host and made a new dir from the skeleton.
Matt Walston
It has worked out of the box
It has worked out of the box for me for every site I've created (something around 20). Granted, they've only been on three different servers, and two of them I setup...