Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7966127
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T06:20:24+00:00 2026-06-04T06:20:24+00:00

htaccess in one of my site but getting funny error when i try to

  • 0

htaccess in one of my site but getting funny error when i try to open site with http://www.online4movies.com/ it dont work, if i don’t use http://online4movies.com/ it work

here is the code

<ifmodule mod_rewrite.c>
    RewriteEngine on
    RewriteCond %{HTTP_HOST} ^www.online4movies.com
    RewriteRule (.*) http://www.online4movies.com/$1 [R=301,L]
    RewriteCond %{request_filename} -f
    RewriteRule ^(.*) $1 [L]
    RewriteRule ^([a-z]+)(/([^/]{0,32})(/.+)?)?$  index.php?a=$1&q=$3    [L]

</ifmodule>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T06:20:26+00:00Added an answer on June 4, 2026 at 6:20 am

    There are a couple of things wrong with the above rules, but the one that is really causing you a problem is that you forgot a ! in front of the right operand of the first RewriteCond.

    Other things that are wrong include:

    • dots . must be escaped to have their literal meaning in a regular expression, which is what the second argument to RewriteCond is.
    • the (.*) would be much safer if you included ^$
    • request_filename should be capitalised
    • Rewriting a URL to itself is confusing and unnecessary, simply pass - as the second argument to the RewriteRule instead. But there is no need for that rule, simply negate the RewriteCond and apply it to the next rule.

    Try this file instead:

    <ifmodule mod_rewrite.c>
    
        # Turn mod_rewrite on
        RewriteEngine on
    
        # Force a www on the beginning of the URL
        RewriteCond %{HTTP_HOST} !^www\.online4movies\.com
        RewriteRule ^(.*)$ http://www.online4movies.com/$1 [R=301,L]
    
        # Parse URLs for files that don't exist and send them through index.php
        RewriteCond %{REQUEST_FILENAME} !-f
        RewriteRule ^([a-z]+)(/([^/]{0,32})(/.+)?)?$  index.php?a=$1&q=$3 [L]
    
    </ifmodule>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

For my site: http://www.indiacustomercare.com which one is the canonical url with www or without
I'm trying to make 301 redirect via htaccess Redirect 301 /page_one http://site.com/ But this
At .htaccess I have such a rule to redirect from site.com to www.site.com: RewriteEngine
My site has some URLs that are rewritten by .htaccess... i.e. this: http://lastminuteislandvacation.com/villa/15/st-john-rental-villa-angelica is
I want to use htaccess rewrite to display single pages without the extensions. http://site.com/account
I just did the following in htaccess: ErrorDocument 404 http://www.website.com My first question is,
i have a site like twitter.com on server one and on server two i
I have a site in /public_html folder and I have another one in /public_html/addondomain.com
On this site: http://church.allthingswebdesign.com/ None of my images are displaying anymore. They used to,
I have a one-page wordpress site. It uses pages and posts but is all

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.