homepage Welcome to WebmasterWorld Guest from 23.20.77.156
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

Visit PubCon.com
Home / Forums Index / Code, Content, and Presentation / Apache Web Server
Forum Library, Charter, Moderators: Ocean10000 & incrediBILL & phranque

Apache Web Server Forum

    
https redirection & trailing slash problem
https trailing /
susheel




msg:3604385
 7:07 pm on Mar 18, 2008 (gmt 0)

Hi,

I have searched endlessly for solutions here I can seem to fix my problem. The problem I seem to face is that I need to place an annoying trailing slash at [svn.example.com...] for it to work properly otherwise it redirects to [svn.example.com:443...] Here's a snippet of what I have in my httpd.conf:

<Virtualhost *:80 *:443>
ServerName svn.example.com

RewriteEngine On
Options +FollowSymlinks
RewriteCond %{SERVER_PORT} !443$
RewriteRule ^(.*)$ https://svn.example.com$1 [R=301,L]

# Subversion Config
<Location /project >
DAV svn
SVNPath /data/svn/project
SVNIndexXSLT "/svnindex.xsl"
...
</Location>
</Virtualhost>

I have another subdomain on the site which works perfectly fine for http -> http redirection

 

wkitty42




msg:3608722
 8:11 pm on Mar 23, 2008 (gmt 0)

1. why do you call it annoying? /project/ is the name of the directory, is it not?

2. try this... it should work fine in /.htaccess

RewriteEngine On
RewriteCond %{REQUEST_URI} ^/project$ [NC]
RewriteCond %{REQUEST_URI} !^/project/$
RewriteRule .* /project/ [L]

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / Apache Web Server
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved