
| | |||||||
| Website Development HTML, traffic, hosting, and more... this is the forum for every webmaster. |
Register Now for FREE! | |||||
| |

| | LinkBack | Thread Tools | Display Modes |
| |||
| 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] Code: RewriteEngine ON RewriteRule ^/Dance/Dance%20Quotes.htm$ http://2nilssons.com/dancequotes.htm$1 [L,R=permanent] Code: RewriteEngine ON RewriteRule ^Dance/Dance%20Quotes.htm$ http://2nilssons.com/dancequotes.htm$1 [L,R=permanent] Any help and guidance with this will be enormously appreciated! Much thanks to anyone that can help! Kristy Nilsson / Atlanta |
| Sponsored Links | ||
| |
| |||
| 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!! |
| |||
| 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 |