+ Reply to Thread
Results 1 to 6 of 6

Thread: HELP .htaccess

  1. #1
    kidcajes is offline x10Hosting Member kidcajes is an unknown quantity at this point
    Join Date
    Sep 2009
    Posts
    21

    HELP .htaccess

    I am having problem, i was thinking that maybe it's the htaccess has the problem.

    Situation:

    if i type: http://??????.com/fetch.php, the part where the fetched data needs to be displayed is working fine but

    if i type:http://www.??????.com/fetch.php the part where the fetched data needs to be displayed are cannot be seen.

    I was hoping that maybe someone can help to solve this with .htaccess conditional statement


    Thank you

  2. #2
    TechAsh's Avatar
    TechAsh is offline Retired TechAsh is an unknown quantity at this point
    Join Date
    Oct 2007
    Location
    UK
    Posts
    5,853

    Re: HELP .htaccess

    Please post the contents of the .htaccess file so that we can see what's going wrong.

    It's probably just needs a "(www.)?" added in.
    Useful Links:
    Terms of Service | Server News | Buy a Domain
    Free Domains: co.cc | Dot.tk -- Free File Storage: Dropbox -- Website Monitoring: Service Uptime


    My Websites:
    Earthtime Games & TechAsh's Blog

  3. #3
    descalzo's Avatar
    descalzo is offline Grim Squeaker descalzo has a brilliant futuredescalzo has a brilliant futuredescalzo has a brilliant future
    Join Date
    Jul 2009
    Location
    Ankh-Morpork
    Posts
    7,636

    Re: HELP .htaccess

    What does the page do?

    Where does the data come from?

    Do you parse URLs anywhere in the script?
    Nothing is always absolutely so.

  4. #4
    kidcajes is offline x10Hosting Member kidcajes is an unknown quantity at this point
    Join Date
    Sep 2009
    Posts
    21

    Re: HELP .htaccess

    this is what is inside the .htaccess

    RewriteEngine On

    RewriteRule ^(.*)/(.*).html$ cities_list.php?county=$1 [L]
    RewriteRule ^(.*)-(.*).html$ final.php?city=$1&state=$2 [L]


    php_value session.use_only_cookies 1
    php_value session.use_trans_sid 0

  5. #5
    misson is offline x10 Spammer misson is a jewel in the rough
    Join Date
    Mar 2008
    Location
    Libertatia
    Posts
    2,506

    Re: HELP .htaccess

    A simple workaround would be to strip the leading "www" using a redirect:
    Code:
    RewriteCond ${HTTP_HOST} ^www\.
    RewriteRule ^/?(.*) http://example.com/$1 [R=301,L]
    As for what's causing the problem, try typing in a URL that would be the final result of rewrites (eg http://www.example.com/final.php?city=New+York&state=NY ) and see what you get so you can check if it's the rewrite that's failing or something else. What's your real site? Not giving a real URL doesn't protect your site, it just makes it harder to help.
    Be sure to read all pages linked in this post; they have further information that should prove useful. When asking for help, make sure you follow Eric Raymond's and Jon Skeet's guidelines for prompt, accurate responses. Please answer any questions I ask; they're not rhetorical (probably). Any posted code is intended as illustrative example, rather than a solution to your problem to be copied without alteration. Study it to learn how to write your own solution.
    Misson, not Mission.

  6. #6
    kidcajes is offline x10Hosting Member kidcajes is an unknown quantity at this point
    Join Date
    Sep 2009
    Posts
    21

    Re: HELP .htaccess

    Tnx. Solved it

+ Reply to Thread

Similar Threads

  1. .htaccess Problem!
    By cookie22 in forum Free Hosting
    Replies: 3
    Last Post: 04-18-2009, 12:12 PM
  2. Server Time-Zone To Local Time-Zone
    By rockee in forum Tutorials
    Replies: 4
    Last Post: 06-02-2008, 09:58 AM
  3. Se puede usar .htaccess????
    By rackfenix in forum Soporte
    Replies: 7
    Last Post: 10-02-2007, 07:03 PM
  4. default .htaccess
    By Fedlerner in forum Computers & Technology
    Replies: 9
    Last Post: 09-05-2007, 09:10 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
x10hosting free hosting for the masses
dedicated servers