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

  • Home
  • SEARCH
  • 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 8366869
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T13:01:15+00:00 2026-06-09T13:01:15+00:00

so I have it rewriting .html to .php, but then it won’t load .html

  • 0

so I have it rewriting .html to .php, but then it won’t load .html files when I need it to. Is there a way to get it to ignore the bookstore directory? I thought I have that in there already, but it doesn’t work.

/public_html/.htaccess
Options +FollowSymlinks
DirectoryIndex index.php index.html index.htm
RewriteEngine on
RewriteCond %{REQUEST_URI} "/bookstore/"
RewriteRule ^(.+)\.html$ http://virtualbookworm.com/$1.php [L]
ErrorDocument 404 /error.php

../bookstore/.htaccess
Options +FollowSymlinks
DirectoryIndex index.php index.html index.htm
Options +Indexes
ErrorDocument 404 /error.php
  • 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-09T13:01:16+00:00Added an answer on June 9, 2026 at 1:01 pm

    To ignore the bookstore directory, you need a ! in front of the expression:

    RewriteCond %{REQUEST_URI} !/bookstore/
    

    Or, you can just turn on the rewrite engine in the htaccess file in the bookstore directory and the rules in your document root will be superceded:

    ../bookstore/.htaccess
    Options +FollowSymlinks
    DirectoryIndex index.php index.html index.htm
    Options +Indexes
    ErrorDocument 404 /error.php
    RewriteEngine On
    

    Additionally, the inclusion of the http://virtualbookworm.com in the rule’s target will cause the browser to be redirected (using a 302 response) and it’ll change the URL in the address bar. If that’s not what you want, just remove it:

    RewriteRule ^(.+)\.html$ /$1.php [L]
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have old.htm and new.htm on a directory, and I need to load file.php
I'm trying to get all HTML and PHP files on my site to redirect
I'm using Intelligencia url rewriting currently but have just leased an IIS 7.5 server
I used to have PHP websites and using url rewriting on picture to have
in my website I have some pages structured in this way: www.mysite.com/x/y.php?query=z I wrote
Rewriting an html element's content, or itself is easy via jquery, but is it
i know this is incredibly easy but I have been writing and rewriting this
I have a need to do some simple modifications to HTML in C++, preferably
I have recently been rewriting some of my iphone app because a couple of
I have a method in a url rewriting module that looks like this public

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.