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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T02:35:17+00:00 2026-05-31T02:35:17+00:00

I have an htaccess file with a simple rewrite rule. RewriteEngine On RewriteRule ^([a-zA-Z0-9]+)/?$

  • 0

I have an htaccess file with a simple rewrite rule.

RewriteEngine On
RewriteRule ^([a-zA-Z0-9]+)/?$ index.php?page=$1

On my web server, the index.php file is in /var/www, and it works normally.

On my local host, the index.php fle is in /var/www/projects/porto and while the file runs normally, no linked content ( images, css, etc ) is loaded.

I am totally new to htaccess files. Any ideas on how to work around it so I can do my testing in my locan environment?

All I’ve tried is changing my .htaccess file to

RewriteEngine On
RewriteRule ^([a-zA-Z0-9]+)/?$ /running/Porto/index.php?page=$1

But no luck.

  • 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-05-31T02:35:18+00:00Added an answer on May 31, 2026 at 2:35 am

    Okay, so continuing our discussion on setting up a VirtualHost on your local machine/environment, it is roughly the same as on your other server. If you can copy the Apache configuration file from the web server then that will be a good start. At a minimum you will need something like this:

    <VirtualHost *:80>
        ServerName localdevsite.com
        DocumentRoot /var/www/running/Proto
    </VirtualHost>
    

    (This assumes that somewhere in the file you have NameVirtualHost *:80)

    The one additional thing you will need to do in your local environment is add a hosts entry:

    In Linux you usually do this in /etc/hosts with something like:

    127.0.0.1 localdevsite.com 
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I currently have a .htaccess file set up with this rule: RewriteRule ^([a-zA-Z0-9_-]+)$ user\.php?user=$1
In a .htaccess context, I have a simple rewriting rule : RewriteEngine on RewriteRule
I have a simple .htaccess file RewriteEngine on RewriteRule ^[^-]*-(.*)$ http://example.com/$1 [R] RewriteRule ^[(template)(internal)(stuff)(files)]
I have the following .HTACCESS: <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteRule ^index\.php$ -
I have a simple redirect : RewriteEngine On RewriteBase / RewriteRule ^test.php$ index.php in
My question is quite simple. I have my main page (www.domain.com/index.php) Is there a
I have such .htaccess file: RewriteEngine On RewriteBase / RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME}\.php
I have a .htaccess file in the root of a website: /var/www/mywebsite/htdocs/.htacess and I
I have a simple URL rewriting setup with a .htaccess file. Excerpt: RewriteEngine On
I have the following rewrite in my .htaccess file which removes the .php extension

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.