Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Developer Center > No trailing slash = default to IP address

No trailing slash = default to IP address
Thread Tools
Senior User
Join Date: Dec 2002
Status: Offline
Reply With Quote
Aug 30, 2005, 09:39 PM
 
Hello All,

Once again I am waist deep in server-foolery.

Thanks to this place I got several sites hosted off of my local machine.

But the other day my girlfriend asked for a blog, and of course, I said no problem. wrong.

I installed wordpress and for the most part, all is well, except for 1 little annoyance.

if you go to tiffanycalvert.com/blog/ all is well.

if you go to tiffanycalvert.com/blog (<----notice no trailing slash) it flips the address to the ip and port address and then adds the trailing slash. And of course, I find this to be the most annoying thing ever right now.

Anyone have any suggestions on how to remedy this? I guess what I'm looking for is something that will auto add the trailing slash.

I have experimented with mod_rewrite, mod_dir and htaccess, but cant seem to get anything to work.

Thanks,

-j
(Last edited by jersey; Aug 31, 2005 at 03:12 PM. )
     
Grizzled Veteran
Join Date: Jun 2001
Location: Melbourne, Australia
Status: Offline
Reply With Quote
Aug 31, 2005, 02:42 AM
 
Originally Posted by jersey
Hello All,

Once again I am waist deep in server-foolery.

Thanks to this place I got several sites hosted off of my local machine.

But the other day my girlfriend asked for a blog, and of course, I said no problem. wrong.

I installed wordpress and for the most part, all is well, except for 1 little annoyance.

if you go to tiffanycalvert.com/blog/ all is well.

if you go to tiffanycalvert.com/blog (<----notice no trailing slash) it flips the address to the iport address and then adds the trailing slash. And of course, I find this to be the most annoying thing ever right now.

Anyone have any suggestions on how to remedy this? I guess what I'm looking for is something that will auto add the trailing slash.

I have experimented with mod_rewrite, mod_dir and htaccess, but cant seem to get anything to work.

Thanks,

-j
You won't need to muck around with mod_rewrite, mod_dir or htaccess if your config is set up the way you want it. Can you post a snippet of your virtual host config, as well as how your ServerName, NameVirtualHost and other related items are set? Should be a relatively straight-forward fix.
Computer thez nohhh...
     
jersey  (op)
Senior User
Join Date: Dec 2002
Status: Offline
Reply With Quote
Aug 31, 2005, 10:09 AM
 
A bit more info: I am running apache 2.054, and have each site (3 total)set up on different ports.

Listen *:80
Listen *:81
Listen *:83
Listen *:84

UseCanonicalName Off

VHost config:

<VirtualHost *:81>
DocumentRoot "/Users/josh/Sites"
ServerName gone.
ErrorLog /Users/josh/Sites/logs/error_log
CustomLog /Users/josh/Sites/logs/access_log combined
<Directory "/Users/josh/Sites">
AddOutputFilterByType DEFLATE text/html text/plain
allow from all
Options +Indexes
</Directory>
</VirtualHost>

<VirtualHost *:83>
DocumentRoot "/Users/tiff/Sites"
ServerName [url]gone
ErrorLog /Users/tiff/Sites/logs/error_log
CustomLog /Users/tiff/Sites/logs/access_log combined
<Directory "/Users/tiff/Sites">
AddOutputFilterByType DEFLATE text/html text/plain
allow from all
Options +Indexes
</Directory>
</VirtualHost>

<VirtualHost *:84>
DocumentRoot "/Users/tlh/Sites"
ServerNamegone
ErrorLog /Users/tlh/Sites/logs/error_log
CustomLog /Users/tlh/Sites/logs/access_log combined
<Directory "/Users/tlh/Sites">
AddOutputFilterByType DEFLATE text/html text/plain
allow from all
Options +Indexes
</Directory>
</VirtualHost>
(Last edited by jersey; Jun 23, 2010 at 01:57 PM. )
     
Junior Member
Join Date: May 2004
Status: Offline
Reply With Quote
Aug 31, 2005, 01:03 PM
 
     
jersey  (op)
Senior User
Join Date: Dec 2002
Status: Offline
Reply With Quote
Aug 31, 2005, 03:09 PM
 
Originally Posted by leira

That was my first course of action, but no dice. It seems as if thats for inside the blog directory, and only works on posts. Thanks.
     
jersey  (op)
Senior User
Join Date: Dec 2002
Status: Offline
Reply With Quote
Aug 31, 2005, 03:14 PM
 
Another thing I noticed, if you type in any of the .com the addresses, it adds the trailing slash automatically.

odd methinks.
     
   
Thread Tools
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 09:27 AM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2