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 8400057
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T21:27:59+00:00 2026-06-09T21:27:59+00:00

Ok, I have a small problem with .htaccess RewriteRule. I made simple website locally

  • 0

Ok,
I have a small problem with .htaccess RewriteRule.

I made simple website locally that uses RewriteRule for urls like:

http://localhost/ <- main page
http://localhost/log/ <- log page
etc.

I have this in my .htaccess file:

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /script
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>

AuthUserFile c:\data\mysite\.htpasswd
AuthType Basic
AuthName "Secret place"
require valid-user

Since the site is ready and it’s basically just a helpful script, I move the contents to http://mysite/script/

It all works when I open http://mysite/script/, but when I click on an url, it opens http://mysite/script/log/ in browser bar, but loads http://mysite/ front page content.

Meaning, the redirect doesn’t let me read the necessaro log content but thinks it’s a rewrite to the front page ( since the main site doesn’t have a value script/log/.

Now, how can I set it to load the real mysite/script/log content?

Thanks in advance.

EDIT:

This is the .htaccess file on main site root:

RewriteEngine On

RewriteCond %{HTTP:range} !(^bytes=[^,]+(,[^,]+){0,4}$|^$)
RewriteRule .* - [F]

RewriteCond %{HTTP_HOST} ^mysite\.com
RewriteRule (.*) https://www.mysite.com/$1 [R=301,QSA,L]

RewriteCond  %{QUERY_STRING} (\&ch_lang\=[]{2}|)
RewriteRule  ^one-of-links$ ?main_page_extend=4011%1 [L]

php_value memory_limit 512M
  • 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-09T21:28:01+00:00Added an answer on June 9, 2026 at 9:28 pm

    You need to change the RewriteBase to /script. Otherwise when the rewrite to /index.php happens, it goes to the document root’s index.php (your front page), instead of the one in script.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have small problem. I have made very simple bootloader. After it's creation I
I have small problem with simple code. This code is working properly on x86
I would like to resize the topmost windows. I have small problem in the
I would like to write to a text file, but I have small problem.
Hy! I'm developing a web site and have a small problem with .htaccess .
I have small problem with http 404 error, after click on 'allow' on facebook
I have a small problem that I want to load a url in web
I have small problem with name spaces in php 5.3. I've made declaration for
I have small problem. I've coded a full website in php using CodeIgniter framework.
I have a small problem. I have a set of ComboBox's that are bound

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.