Forum Moderators: phranque

Message Too Old, No Replies

htaccess override parent rules

Is it possible to override rules in a htacces parent directory?

         

wolfito

4:27 pm on May 6, 2010 (gmt 0)

10+ Year Member



Hi everyone,

This is my ever first post, so apologies if I do/say something inappropriate.I have very basic skills programming, however I do my best and I usually get results, but this time I need a glimpse of advice cuz I'm really lost.

Well, I have the Idea of provide users/search engines that visit my site, with clean URLs, and I did it through an .htaccess, I wrote the rule and voila, It works, but as nothing is perfect, I had a problem as well.

my .htacces:
----------------------------------------------
Options +FollowSymlinks
RewriteEngine On
RewriteBase /

RewriteRule ^faqs/ /features.php [NC]
RewriteRule ^faqss/ /features.php [NC]
----------------------------------------------

The first rule doesn't work, but the second one does, simply redirect an fake url to a file, and after hours of trying I came to the conclusion that there should be another .htaccess in the parent directory (which I cannot reach due to configuration in my server account, I'm supposed to be in the root directory) that has a similar GLOBAL rule involving words that I really need to name my fake directories such (aboutus,startnow,contacus,etc..), this fact mess up with my basic little tinny .htacces.

by the way my provider is 1&1.

I'll really appreciate any help or guidance in this matter,

cheers,

wolfito

jdMorgan

4:57 pm on May 6, 2010 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



If your server configuration "grabs" certain words in the URL-path, there is nothing you can do about it, since your .htaccess code won't even run if they block or otherwise divert these requests.

You need to have a word with your host, or change hosts (you get what you pay for, and sometimes what you need to pay for is control over your own site). Cheap hosting often costs the most -- in terms of time wasted on problems.

Alternately, consider trying to prepend some small, friendly word such as "our-" to these paths, e.g. /our-faqs/". That might work, depending on how smart their attempted anti-abuse filter is. But then again, you run the risk that they might make their filter smarter at some time in the future, and break all of your URLs again...

Jim

wolfito

12:32 pm on May 7, 2010 (gmt 0)

10+ Year Member



Sad for me, I'll try to contact my provider if not I'll use your suggestion about word combination.

thanks for the quick answer