Results 1 to 5 of 5

Thread: Rewrite URL Not Working

  1. #1
    User
    Join Date
    06-30-09.
    Posts
    37

    Default Rewrite URL Not Working

    When I enable rewrite url on the settings page, I get 404 errors on the front-end. I think it has something to do with the .htaccess file, as there was already an .htaccess in that directory. I have now renamed that file and tried it again, but it still doesn't work. Can anyone tell me what exactly happens when this feature is enabled? Does it edit the .htaccess file? Does it just look for the presence of the file? How can I reset everything so that enabling the rewrite url function will work?

  2. #2
    User
    Join Date
    06-19-09.
    Posts
    328

    Default Re: Rewrite URL Not Working

    please post your .htaccess file, it must looks like:

    Code:
    # Enable mod_rewrite
    RewriteEngine On
    # line below must be changed if you are have your website under something different from website root
    # e.g. you website is located at http://www.example.com/somedir instead of http://www.example.com
    RewriteBase / 
    
    # Block any URI protocol in the query string
    RewriteCond %{QUERY_STRING} (ftp|https?):|/etc/ [NC]
    RewriteRule .* - [F,L]
    
    # Block any URI protocol in the request
    RewriteCond %{REQUEST_URI} (ftp|https?):|/etc/ [NC]
    RewriteRule .* - [F,L]
    
    # Rewrite TYPOlight URLs
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule .*\.html$ index.php [L]
    Consulenza Contao CMS https://www.intco.it

  3. #3
    User
    Join Date
    06-30-09.
    Posts
    37

    Default Re: Rewrite URL Not Working

    my .htaccess file is as follows (actually, it is currently ._htaccess):
    Code:
    ##
    # Rewrite base
    ##
    RewriteEngine On
    RewriteBase /
    
    ##
    # Block malicious requests
    ##
    RewriteCond %{REQUEST_URI} (ftp|https?):|/etc/ [NC,OR]
    RewriteCond %{QUERY_STRING} (ftp|https?):|/etc/ [NC]
    RewriteRule .* - [F,L]
    
    ##
    # Compress .js and .css files
    ##
    AddEncoding gzip .gz
    AddType "text/javascript" .gz
    AddType "text/css" .gz
    RewriteCond %{HTTP:Accept-encoding} gzip
    RewriteCond %{REQUEST_FILENAME} \.(js|css)$
    RewriteCond %{REQUEST_FILENAME}.gz -f
    RewriteRule ^(.*)$ $1.gz [L]
    
    ##
    # Rewrite TYPOlight URLs
    ##
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule .*\.html$ index.php [L]

  4. #4
    Experienced user
    Join Date
    06-20-09.
    Posts
    1,311

    Default Re: Rewrite URL Not Working

    theres your problem....rename it to .htaccess
    ._htaccess isn't read, its kind of like a backup

  5. #5
    New user
    Join Date
    07-10-09.
    Posts
    13

    Default Re: Rewrite URL Not Working

    Anyone have any experience with modifying the typolight .htaccess file (rewrite specifically) for an ISP hosted zeus (zws) configuration. Needs a rewrite.script file but the syntax has defeated me.

Bookmarks

Posting Permissions

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