treehouse : what would you like to learn today?
Web Design Web Development iOS Development

htaccess file is not working on the hosting server

  • htaccess file is not working on the hosting server is there any alternative

  • What have you tried so far?

    1. Tell us what you're trying to accomplish with your .htaccess file. URL redirects? Cross-domain access of fonts for Firefox? Setting MIME-types? What's the goal?

    2. Tell us what isn't working, in detail. Are your redirects failing to take effect? Are your fonts not working? Are you getting any errors? Could it be a simple permissions issue (WordPress, for example, needs read-write permission on your .htaccess file to make any changes from within the dashboard)?

    3. Paste the contents of your .htaccess file.

    4. Where is your .htaccess file? Is it possible it's in the wrong folder? It should probably be in the root directory of your site. On most hosts, this is /public_html, /www, or /var/www. If you're running WordPress, it needs to be in the root folder of your WordPress installation.

    5. Finally, if it is a redirect issue, check with your hosting provider to ensure that the Apache mod_rewrite module is enabled.

  • want to rewrite url only

  • Good lord, well that clarifies everything. If you want help and support, try spending more than 10 seconds responding to people who are actually trying to assist you. It's called manners.

    With the almost non-existent information you have given, all I can say is that there is an alternative, providing all you are wanting to do is use a pretty url substitute:

    http://domain.com/index.php/Blog/Hello_World
    

    You will need to use:

    $_SERVER['PATH_INFO']
    

    To get the variables. Remember to validate the inputs before actually using them.

  • want to rewrite url only

    ...yeah...

    read @JoshBlackwood's post again.