Apache: Trailing Slash Problem
First off, I've already read this:
http://httpd.apache.org/docs/misc/rewriteguide.html
I'm running my webserver off COX, who has port 40 blocked. So my httpd.conf looks like this:
NameVirtualHost *
NameVirtualHost *:801
NameVirtualHost *:802
<VirtualHost *>
ServerAdmin <a href="mailto:[email protected]" class="bb-email">[email protected]</a>
ServerAlias host.maxalbert.com *.host.maxalbert.com
ServerName host.maxalbert.com
DocumentRoot /home/host.maxalbert.com/public_html
</VirtualHost>
<VirtualHost *:801>
ServerAdmin <a href="mailto:[email protected]" class="bb-email">[email protected]</a>
ServerAlias maxalbert.com *.maxalbert.com
ServerName maxalbert.com
DocumentRoot /home/maxalbert.com/public_html
</VirtualHost>
<VirtualHost *:802>
ServerAdmin <a href="mailto:[email protected]" class="bb-email">[email protected]</a>
ServerAlias thepushpin.com *.thepushpin.com
ServerName thepushpin.com
DocumentRoot /home/thepushpin.com/public_html
</VirtualHost>
I've been playing with the .htaccess file in /home/maxalbert.com/public_html
I've had no luck so far. The .htaccess file currently looks like this:
php_value include_path .:/home/maxalbert.com/php_inc
# fix the trailing slash problem
RewriteEngine on
RewriteBase /
#RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^(.*)(.+[^/])$ $1$2/ [R]
It's not adding the slash for me?
What's the solution?
Mark Hensler
If there is no answer on Google, then there is no question.
Mark Hensler posted this at 08:41 — 13th October 2001.
He has: 4,048 posts
Joined: Aug 2000
About 2 hours later, I solved it.
I found the answer here: http://www.oreillynet.com/pub/faqs/apache_faq_prompted-twice
I changed 'UseCanonicalName' from 'On' to 'Off'.
I tested it, and it worked.
I then removed all the rewrite stuff, and it still works.
Mark Hensler
If there is no answer on Google, then there is no question.
mairving posted this at 10:09 — 13th October 2001.
They have: 2,256 posts
Joined: Feb 2001
Glad I could help you, Mark. You do need to quit answering your own questions. Next thing you will be talking to yourself.
Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.