Results 1 to 9 of 9

Thread: .htaccess directives

  1. #1
    l0mars01 is offline Junior Member
    Join Date
    Jan 2014
    Posts
    1

    Question .htaccess directives

    I can't get some features in my .htaccess file to work, specifically indexes or content negotiation like multiviews.
    I've had the .htaccess file work on another webhost before.
    What features does the server allow? (What is the AllowOverride setting?)

  2. #2
    Gianluca is offline Administrator
    Join Date
    Feb 2010
    Posts
    512

    Default

    In order to use such features you should override "Options", and this isn't allowed at this time.

  3. #3
    tecnicosbh is offline Junior Member
    Join Date
    Feb 2014
    Posts
    1

    Default

    I have the same problem.

    My htacess
    RewriteEngine On
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_FILENAME}.php -f
    RewriteRule ^(.+?)/?$ $1.php [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_FILENAME}.html -f
    RewriteRule ^(.+?)/?$ $1.html [L]
    So I dont have to write .html or .php in URL i just have to enter like www.example.com/page
    ONLY IN ALTERVISA IT IS NOT WORKING.

  4. #4
    Gianluca is offline Administrator
    Join Date
    Feb 2010
    Posts
    512

    Default

    I guess you are missing RewriteBase, try to add:

    Code:
    RewriteBase /
    Right after RewriteEngine directive

  5. #5
    fpcklan is offline Junior Member
    Join Date
    Jan 2014
    Posts
    3

    Default

    I have a problem.

    My htacces:

    Options +FollowSymlinks
    RewriteEngine on
    RewriteBase /ujweblap
    RewriteRule ^index/(.*)/?$ index.php?o=$1
    I would like to rewrite /ujweblap/index.php?o=1 --> /ujweblap/index/1
    Sorry My bad english

  6. #6
    Gianluca is offline Administrator
    Join Date
    Feb 2010
    Posts
    512

    Default

    fpcklan:

    can you please explain what is the problem? Are you getting any error?

  7. #7
    fpcklan is offline Junior Member
    Join Date
    Jan 2014
    Posts
    3

    Default

    I would this http://fpcklan.altervista.org/ujweblap/?o=1 rewrite to this http://fpcklan.altervista.org/ujweblap/1
    My rewriterule not work.
    i don't getting error, only do nothing.
    Last edited by fpcklan; 05-26-2014 at 04:23 PM.

  8. #8
    Gianluca is offline Administrator
    Join Date
    Feb 2010
    Posts
    512

    Default

    I guess you should use "/" as RewriteBase, however you should check this: mod_rewrite - Apache HTTP Server Version 2.2

  9. #9
    fpcklan is offline Junior Member
    Join Date
    Jan 2014
    Posts
    3

    Default

    Thanks for the help, problem solved.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

SEO by vBSEO