redirect a URL path that exists in the filesystem


Recommended Posts


I was trying to redirect /foswiki/bin/view to /view. Apparently the redirect tool in cPanel doesn't work when given a URL path that corresponds to a real directory. I found that I had to put my rewrite rules in the .htaccess in the foswiki/bin subdirectory, not in the root directory.

Furthermore, the 'source' URLs didn't have the /foswiki/bin part. Here are the rules that I am using right now:

RewriteRule ^view$ "/view" [R=302,L,NE]

RewriteRule ^view/(.*) "/view/$1" [R=302,L,NE]

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.