I have mod_rewrite enabled and it seems to work everywhere else but for the admisiter pages; /admin/ and all the /admin/ subdirectories.

Don't know if this means anything but when logged in as the admin and attempting to access the administer link which points to http://www.example.com/admin it goes to http://example.com/admin/ (notice the missing www.)

Thanks in advance for your help. If I can't get clean URLs to work I'll have to find another CMS and I hate to switch as Drupal seems to be the best open source CMS.

Comments

usrbingeek’s picture

Is anyone home?

ezheidtmann’s picture

You might have a situation like this one: http://drupal.org/node/2476

usrbingeek’s picture

None of those "solutions" worked for me and they don't appear to have worked for others. Also, I'm not running ensim and I don't see anything in any of my server config files that rewrite or redirect directories named admin.

ezheidtmann’s picture

What is the error message when you try to visit /admin?

usrbingeek’s picture

Page not found (Its not a server message, its from within Drupal.)

ezheidtmann’s picture

Does it work for /?q=admin ? Does it work for http://example.com/admin (no www, no trailing slash)?

I have no clue what your problem is, but I'm hoping you'll tell me something that gives a hint.

usrbingeek’s picture

I appreciate your help!

Does it work for /?q=admin ?

Yes, it works with Clean URLs disabled. (But I need to use CleanURLs for search engine and context ad compatibility.)

Does it work for http://example.com/admin

Nope, doesn't make a difference with or without www.

sepeck’s picture

Not sure what your solution is but /?q= does not actually prevent your site from being searched and archived by search engines. :)

-sp
---------
Test site...always start with a test site.
Drupal Best Practices Guide

-Steven Peck
---------
Test site, always start with a test site.
Drupal Best Practices Guide

usrbingeek’s picture

Its my understanding that it lowers your "google juice" if you don't use clean urls and real words for your file names (instead of numbers).

ezheidtmann’s picture

If you do a new install in the same environment, do you still see the same problems?

Are you running multiple sites? Do you have the right $base_url in the applicable settings.php?

Again, I'm groping for hints.

usrbingeek’s picture

No, just one site. I have the base_url correct, but should have I included www. in it? example:
$base_url = 'http://www.example.com';

I'm going to try another install shortly.

usrbingeek’s picture

I downloaded a fresh copy of Drupal and did a test install in a sub directory on another domain, but on the same server as this one, and it works.

usrbingeek’s picture

So, I deleted everything on the main site, reinstalled drupal and it still doesn't work. It only works if I put drupal in a sub directory. i.e. http://www.example.com/a/

Please, anyone have any ideas how I can make it work in the top level directory?

TDobes’s picture

Short answer: You can't do what you're asking for. The "admin" directory is reserved by your host and you can't use it. Get a different hosting provider or try to convince your host to turn this off. This is the way one of the old hosts worked for a site I redesigned... I believe they had Cobalt RaQ servers, which seem to reserve the directory "admin" for global administration. We moved them to a different hosting provider which solved the problem nicely.

Long answer: Maybe you could make it work by setting up a mass URL alias in Drupal to change the "admin" directory and all its subdirectories to something else... like you could use "drupal_admin" instead of "admin". I haven't actually used this feature personally, but I think it might solve your problem. There's more info in the original patch and in the help text for path.module.

usrbingeek’s picture

I have spoken with several techs and an admin at the NOC and have been repetitively told its not being caused by anything they have set up. I have a dedicated server, it's a dell not a crappy raq, and I have root access and of course access to apache and all the config files. Obviously, changing NOCs won't solve the issue.

I'm going to try your suggestions in the long answer.

But, after searching the forums more and noticing the frequency of this problem occurring with new drupal installs I believe that there should be an easier method for everyone to change the directory name if they so desire.

Holgerson’s picture

It's not a real solution for the problem, but if it is because of search engines: Search engines can't and won't login anyway, so the "admin"-section isn't really important for SEO. As long as it works for the real site everything should be OK for your website and the robots.

econsultoria

dude4linux’s picture

I've been trying to get Clean URLs to work for most of the day. I've tried about every suggestion I could find on the Drupal.org site. I have no problem getting getting them to work except in the /admin urls. Finally it occurred to me that something might be redirecting /admin.

grep admin /etc/httpd/conf.d/* returned the following:
mod_jk.conf:Alias /admin "/usr/share/tomcat4/webapps/admin"

I had forgotten that tomcat5 was using /admin. When I shutdown tomcat5 and renamed mod_jk.conf, then restarted httpd, the clean urls in Drupal are all working as expected. Now I have to figure out how to re-enable tomcat5 without the conflict.

Hope this helps someone with the same problem.

Information is free, knowledge is acquired, but wisdom is earned.

9802008’s picture

Thanks dude4linux

I had a similar problem. Mine was a bit more obvious :-) a directory called 'admin' already existed on the site.

www.johnstonwebsolutions.com/we_install_modify_and_maintain_drupal_web_s...

lefnire’s picture

I ran into the same problem, but I'm on shared hosting so there's no fix for me. I don't know about that "google juice," but as long as I'm searchable then I'm good:

Not sure what your solution is but /?q= does not actually prevent your site from being searched and archived by search engines. :)

(Read if you're on shared hosting) I had some problems doing site verification and sitemap submission, both which are addressed in the README.txt. In short, you have to create that verification page manually and upload it via ftp to your web server. Then for sitemap submission, you must use "index.php?q=sitemap.xml" instead of "?q=sitemap.xml," or google will give you some "improper sitemap format" error.