Computer Forums

Go Back   Computer Forums > Internet > Website Development

Website Development HTML, traffic, hosting, and more... this is the forum for every webmaster.

Register Now for FREE!
Computer Forums

Username: Password: Confirm Password: E-Mail: Confirm E-Mail:
Agree to forum rules 


Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 03-02-2007, 07:17 PM
Newbie
 
Join Date: 02 Mar 2007
Posts: 2
kristynilsson is on a distinguished road
Default Apache 1.3: htaccess mod_rewrite (seemed-simple redirects)

Good afternoon, and much thanks in advance!

Two issues, seemingly minor - but I'm drowning in htaccess mod_rewrite. Mea culpa: I am a ballet choreographer with a growingly popular and huge set of dance quotes on a page I named before I understood the importance of naming protocols.

Site: http://2nilssons.com Server: Apache 1.3.37 (Unix) Host: midphase

1. Exclude www redirect: optimized search engine results (have registered as such w/Google, but for other engines need redirect in htaccess)
FROM http://www.2nilssons.com
TO http://2nilssons.com

2. Path/file rename redirect: corrections for crappy, capitalized, too-long titling disease to exclude unnessary sub-dirs and title gaps that result in %20. Most critical example:
FROM <http://2nilssons.com/Dance/Dance Quotes.htm> ALSO AS <http://2nilssons.com/Dance/Dance%20Quotes.htm>
(the above paths are no longer working, as I thought my .htaccess redirects would work, and I've already done the site mods... hence the urgency)
TO http://2nilssons.com/dancequotes.htm

Attempted .htaccess redirects to no avail; neither redirect is working.


Here is the original .htaccess code; the website and uploads function properly:

Code:
# -FrontPage-

IndexIgnore .htaccess */.??* *~ *# */HEADER* */README* */_vti*

order deny,allow
deny from all
allow from all

order deny,allow
deny from all

AuthName www.2nilssons.com
AuthUserFile /home/nilsson/public_html/_vti_pvt/service.pwd
AuthGroupFile /home/nilsson/public_html/_vti_pvt/service.grp

A. This is my attempt at the exclude www redirect:
Code:
RewriteEngine ON
RewriteRule ^/Dance/Dance%20Quotes.htm$ http://2nilssons.com/dancequotes.htm$1 [L,R=permanent]
B. These are my attempts at the redirect to simpler path names:
Code:
RewriteEngine ON
RewriteRule ^/Dance/Dance%20Quotes.htm$ http://2nilssons.com/dancequotes.htm$1 [L,R=permanent]
Also, w/o the "/" afer "^" and before first "Dance" in first path:
Code:
RewriteEngine ON
RewriteRule ^Dance/Dance%20Quotes.htm$ http://2nilssons.com/dancequotes.htm$1 [L,R=permanent]
The rewrites don't accomplish the redirects. Further: if installed below existing, working .htaccess code - site works, but uploads don't work; and, if installed after the "IndexIgnore" statement and before the "order deny,allow" statement, the site stops working immediately.

Any help and guidance with this will be enormously appreciated!

Much thanks to anyone that can help!


Kristy Nilsson / Atlanta
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 03-02-2007, 10:31 PM
Secondary Administrator
 
Join Date: 20 Feb 2006
Location: United Kingdom
Posts: 579
robputt796 has a reputation beyond reputerobputt796 has a reputation beyond reputerobputt796 has a reputation beyond reputerobputt796 has a reputation beyond reputerobputt796 has a reputation beyond reputerobputt796 has a reputation beyond reputerobputt796 has a reputation beyond reputerobputt796 has a reputation beyond reputerobputt796 has a reputation beyond reputerobputt796 has a reputation beyond reputerobputt796 has a reputation beyond repute
Default

Hello Kristy

Welcome to CompuForums, we hope that you become an active member of the community and that you visit regularly. Also, please add yourself to our member map. I have taken a read through your problem, although I am not in a fit state to reply. I am very tired, although Ill reply properly tomorrow morning, when I get up.

Is this your own server or is it a shared web hosting server?

I am quite used to changing Apache settings under Apache 2.2 in Solaris. So, hopefully I can help. It's quite interesting really, I have recently been setting up a few VirtualHosts using the proxy options to circumvent the filtering stuff at college so I can get onto my personal email account. Instead of using the college's email, as the attachment restrictions on the college system is very small.

Ill reply tomorrow morning. Please check back later .
__________________
-Rob Putt - Blog!
CompuForums Secondary Administrator
+ Download the CompuForums Thread Viewer!
+ Add yourself to the Member Map!
+ Be sure that you are up-to-date with the rules.
+ Still Not A Member? Register Now!
+ Contact Us
+ Email Me! - rob at compuforums dot org
+ipHideAway - Unfilter Anything Anywhere! Anonamize your surfing today!!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 03-03-2007, 01:54 AM
Newbie
 
Join Date: 02 Mar 2007
Posts: 2
kristynilsson is on a distinguished road
Default

Hi, Rob!

Hope you got some good rest.

Thank you for the big welcome and the offer of assistance. Went to the map and created challenges entereing the Long and Lat... about to go back again. We are on a shared host server at Midphase - don't know if that had anything to do with this, but this has been a huge pain.

A programmer solved both the initial problems (code below), but we have smaller new ones (or one, with two additional questions...) - which I'd greatly appreciate your thoughts on!

Last Issues:

1) We discovered that with the addition of the new .htaccess file code, we can't access the server for updating the website. IE: to do updates, we have to strip out the added code from .htaccess, do the update, then reinstall the new code in .htaccess again. Any thoughts?

2) How many Redirect statements can one safely enter in the .htaccess file? We may need to apply this solution to a few more files; do you know if there is a practical or absolute limit?

And, 3) Should we add an [L] at the end of the last statement, or any of other code (Permanent, etc.)


Here's the code that solved the two issues (see original post for the pre-existing .htaccess code):


[code]
# -FrontPage-

IndexIgnore .htaccess */.??* *~ *# */HEADER* */README* */_vti*

order deny,allow
deny from all
allow from all

order deny,allow
deny from all

AuthName 2Nilssons Home Page - Scott & Kristy Nilsson
AuthUserFile /home/nilsson/public_html/_vti_pvt/service.pwd
AuthGroupFile /home/nilsson/public_html/_vti_pvt/service.grp

Options +FollowSymLinks
RewriteEngine On
RewriteCond %{HTTP_HOST} .
RewriteCond %{HTTP_HOST} !^2nilssons\.com [NC]
RewriteRule (.*) http://2nilssons.com/$1 [R=301,L]

Redirect 301 "/Dance/Dance Quotes.htm" Favorite Ballet and Dance Quotes of Scott and Kristy Nilsson
[code]


Thank you, Rob - and to everyone else on the site - for your think-time and attention on this.

Any thoughts on the additional questions/problems will be greatly appreciated.


Kristy
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Thread Tools
Display Modes

Posting 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


All times are GMT. The time now is 09:32 PM.



Powered by: vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Limited.
Content © Copyright 2005-2008 CompuForums. All Rights Reserved. Some content © Copyright of the respective owners.
Loans - Loans - Mobile Phones - Credit Counseling

Content Relevant URLs by vBSEO 3.2.0 RC5