Drupal 6 Clean URL configuration on Windows XP and Apache 2.2(依此实现Clean URL)
2009-10-29 22:20
645 查看
http://drupal.org/node/399310
Enter Apache 2.2 conf directory:
Open httpd.conf
Uncomment loading of read-write module by removing #:
Uncomment including virtual hosts delaration file by removing #:
For declaring only localhost
create or clear contents of file conf/extra/httpd-vhosts.conf
Copy and paste the following in this file:
Jeff in Seattle
» Login or register to post comments
Very helpful post.
I would also like to add that you also may have to set the "AllowOverride" directive to "All" [around line 224 in the httpd.conf file] to allow directives in the .htaccess to work.
around that line, you can see,
<Directory />
Options FollowSymLinks
AllowOverride All
Order deny,allow
Deny from all
Satisfy all
</Directory>
--
Cheers,
shaunak.
Login or register to post comments
@shaunak
Thanks so much. I've tried everything under the sun, and it didn't work. Your post led me to this in my httpd.conf:
Options FollowSymLinks
AllowOverride None
Which was overridding every single thing I tried, and I didn't even know it. As soon as I changed None to All, boom, it was working.
在上述设置完成后,再进行以下两步:
(1)"开始"--"程序"--"Apache HTTP Server 2.2.6"--"Control Apache Server"--"Restart"
(2) 打开IE浏览器,pointer to http://127.0.0.1/drupal/
"Administrater"--"site configure" --"Clean URLs"--选Enable
Enter Apache 2.2 conf directory:
> cd C:\Program Files\Apache Software Foundation\Apache2.2\conf
Open httpd.conf
> notepad httpd.conf
Uncomment loading of read-write module by removing #:
LoadModule rewrite_module modules/mod_rewrite.so
Uncomment including virtual hosts delaration file by removing #:
# Virtual hosts Include conf/extra/httpd-vhosts.conf
For declaring only localhost
create or clear contents of file conf/extra/httpd-vhosts.conf
Copy and paste the following in this file:
<Directory /> Options FollowSymLinks AllowOverride All Order deny,allow Deny from all Satisfy all </Directory> <Directory "C:/Program Files/Apache Software Foundation/Apache2.2/htdocs"> Options Indexes FollowSymLinks AllowOverride All Order allow,deny Allow from all RewriteEngine on RewriteBase / RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ index.php?q=$1 [L,QSA] </Directory> # Use name-based virtual hosting. NameVirtualHost 127.0.0.1 <VirtualHost 127.0.0.1> DocumentRoot "C:/Program Files/Apache Software Foundation/Apache2.2/htdocs" ServerName localhost DirectoryIndex index.php </VirtualHost>
Jeff in Seattle
» Login or register to post comments
Very helpful guide
shaunak - March 13, 2009 - 12:05Very helpful post.
I would also like to add that you also may have to set the "AllowOverride" directive to "All" [around line 224 in the httpd.conf file] to allow directives in the .htaccess to work.
around that line, you can see,
<Directory />
Options FollowSymLinks
AllowOverride All
Order deny,allow
Deny from all
Satisfy all
</Directory>
--
Cheers,
shaunak.
Login or register to post comments
Thanks
dmartin - August 13, 2009 - 18:06@shaunak
Thanks so much. I've tried everything under the sun, and it didn't work. Your post led me to this in my httpd.conf:
Options FollowSymLinks
AllowOverride None
Which was overridding every single thing I tried, and I didn't even know it. As soon as I changed None to All, boom, it was working.
在上述设置完成后,再进行以下两步:
(1)"开始"--"程序"--"Apache HTTP Server 2.2.6"--"Control Apache Server"--"Restart"
(2) 打开IE浏览器,pointer to http://127.0.0.1/drupal/
"Administrater"--"site configure" --"Clean URLs"--选Enable
相关文章推荐
- Install and config Apache, PHP, MySql on windows XP
- How to Install PHP 5 for Iis 6 on Windows Xp and 2003 - wikiHow
- IIS: Creating Multiple Web Sites within IIS on Windows 2000 and Windows XP Professional
- 在Windows平台使用Apache2.2和Mongrel运行Ruby on Rails
- Manual install on Windows 7 with Apache and MySQL
- Custom NAT and DHCP Configuration on a Windows Host
- Windows XP+Apache2.2+PHP5.3+OCI8 痛苦安装总结
- Windows 安装Apache2.2和Mongrel运行Ruby on Rails
- 在Windows平台使用Apache2.2和Mongrel运行Ruby on Rails
- Proxy and site on same port with Apache 2.2
- OPC AND DCOM CONFIGURATION ON WINDOWS 2008 AND WINDOWS 7
- 在Windows平台使用Apache2.2和Mongrel运行Ruby on Rails
- Microsoft will end OEM and shrink-wrapped sales of Windows XP on June 30, 2008
- Q: #6 Is the Feature Builder Preview supported on Windows XP and Windows Server 2003?
- Migrating files between NTFS on Windows XP and Solaris 10
- 在Windows平台使用Apache2.2和Mongrel运行Ruby on Rails
- How To Release and/or Renew IP Addresses on Windows XP | 2000 | NT
- A little more info on raw sockets and Windows XP SP2
- 【转】A little more info on raw sockets and Windows XP SP2
- Open Text VCM8.0 installation and upgrade on Windows XP