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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T10:07:37+00:00 2026-06-15T10:07:37+00:00

I am migrating from a zeus platform to apache and having problems with the

  • 0

I am migrating from a zeus platform to apache and having problems with the following rewrite:

/12345-somepage.html
/event.php?ref=12345

This is the .htaccess

RewriteEngine  on
RewriteRule    ^/([0-9]*)- /event.php?ref=$1 <-- This doesn't work 404 not found
RewriteRule    ^otherpage.htm  index.php?Month=0&Category=otherpage <- This one works

This is the exisiting Zeus rewrite rule:

match URL into $ with ^/([0-9]*)-
if matched then set URL = /event.php?ref=$1

I have verified that the target address works i.e. /event.php?ref=12345

  • 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-15T10:07:39+00:00Added an answer on June 15, 2026 at 10:07 am

    Your default RewriteBase is /, that’s why you dont match a leading /, set the RewriteBase to prevent unexpected behaviour, add modifier [L] so Apache stops processing the following rewrites after this matched, add [QSA] to append a query string from the original url

    This works:

    RewriteEngine On
    RewriteBase /
    
    RewriteRule    ^([0-9]+)- /event.php?ref=$1 [L,QSA]
    

    my event.php

    <?php 
    echo $_SERVER['PHP_SELF'];
    echo "\n";
    print_r( $_GET ); 
    ?>
    

    The output

    # curl -i http://localhost/1234-mypage.html
    HTTP/1.1 200 OK
    Date: Sat, 01 Dec 2012 22:57:28 GMT
    Content-Type: text/html
    
    /event.php
    Array
    (
        [ref] => 1234
    )
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

We're migrating from JBOSS 4.x to 5.1, and having problems with the character encodings.
Just migrating from PHP 5.2 to 5.3, lot of hard work! Is the following
I'm migrating from server side development (java, php) to client side - HTML, CSS,
I am migrating from Ubuntu 10.04 to Ubuntu 11.10 (oneiric), but I have problems
I am in the process of migrating from a Django FastCgi setup in Apache
We are migrating from one content system into another and have tons of HTML
I'm currently migrating from a Linux (Apache) server to Windows (IIS). On Linux I'm
Migrating from PHP to EJB , I have previous experience of PHP , C++
After migrating from XCODE 4 to 4.2 i have quite a few problems with
Migrating from OpenGL ES1.1 to 2.0 for 2D purposes (orthographic), and I'm having a

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.