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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T08:52:22+00:00 2026-06-17T08:52:22+00:00

I have this very basic rewrite rule, no matter what I try, results in

  • 0

I have this very basic rewrite rule, no matter what I try, results in an Error 500.

RewriteEngine On
RewriteRule ^folder/(.*) /folder/index.php?Alias=$1 [L]

My httpd.conf file has the following content: (which seems OK to me)

<Directory "/var/www/html">
    Options -Indexes FollowSymLinks
    AllowOverride All
    Order allow,deny
    Allow from all
   <IfModule mod_suphp.c>
        suPHP_Engine On
        suPHP_UserGroup webapps webapps
    SetEnv PHP_INI_SCAN_DIR
   </IfModule>
</Directory>

Any suggestions on what might be going wrong? I’ve also tried to add $ at the end of my rewrite rule.

  • 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-17T08:52:23+00:00Added an answer on June 17, 2026 at 8:52 am

    The rewrite engine will loop repeatedly, until the URI stops changing, or the internal redirect limit is reached which causes the 500 error to be thrown. Your rule’s target URI /folder/index.php will get thrown back into the rewrite engine and your same rule’s regex matches it, ^folder/(.*). So you’ll need to add some kind of condition to prevent the loop.

    RewriteEngine On
    RewriteCond %{REQUEST_URI} !^/folder/index\.php
    RewriteRule ^folder/(.*) /folder/index.php?Alias=$1 [L]
    

    This is simple, it simply won’t apply the rule if it already starts with /folder/index\.php. You can also try:

    RewriteEngine On
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^folder/(.*) /folder/index.php?Alias=$1 [L]
    

    This is a little less restrictive of a condition. It only applies the rule if the requested URI doesn’t map to an existing file or directory. This assumes that when you try to go to /folder/blahblah there isn’t a directory or file blahblah and that you want to route it through your index.php.

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

Sidebar

Related Questions

So I have this weird looking problem: my very basic program generates an error
This is a very basic question...quite embarassing, but here goes: I have a Stopwatch
I have a very basic question. Lets take this snippet: #include <stdio.h> void foo(void)
I have a messaging system (very basic) that has a table like this: **MESSAGE_ID**
So, I have this very weird error - Some advanced PHP devs might also
I have this very basic problem, >>> from django.core import serializers >>> serializers.serialize(json, {'a':1})
I have this very basic tabbed block: $('.tabbed-section .panel').hide(); $('.tabbed-section .panel:first').show(); $('.tabbed-section .tabs li:first').addClass('active');
I have this code for my very very basic WPF Project. <Window x:Class=WpfApplication1.Window1 xmlns=http://schemas.microsoft.com/winfx/2006/xaml/presentation
I am new to javascript and have a very basic question: I have this
This is a very basic question. I have this script: <script type=text/javascript> function write(){

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.