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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T10:43:28+00:00 2026-06-17T10:43:28+00:00

I have the following rewrite rules but every time I restart Apache they prevent

  • 0

I have the following rewrite rules but every time I restart Apache they prevent apache from restarting and FAIL.

One error was…

Starting httpd: Syntax error on line 82 of /var/www/vhosts/current_release/url-rewrite-maps/catchall.txt: RewriteRule: cannot compile regular expression
'^/ProductDetails\.aspx\?PromotionID\(.*)\&id\(.*)$' [FAILED]

RewriteRule ^/ProductSearch\.aspx\?Ntt\=(.*)\&N\=(.*)$ catalogsearch/result/?q=$2 [R=302,L,NC]  
#old search redirect to search

RewriteRule ^/ProductSearch\.aspx\?viewall\=1\&N\=(.*)$ productsearch.aspx?N=$1 [R=302,NC]  
#viewall with N parameter to another redirect rule for URL with N= value only

RewriteRule ^/ProductSearch\.aspx\?(Ne|No)\=(.*)\&N\=(.*)$ productsearch.aspx?N=$3 [R=302,NC]  
#url with Ne OR No param and N= to productsearch.aspx redirect on URLs with N= only

RewriteRule ^/ProductDetails\.aspx\?PromotionID\=(.*)\&id\=(.*)$ productdetails.aspx?id=$2 [R=302,NC]  
#should pass the PID into the ID= and redirect from there

RewriteRule ^/ProductDetails\.aspx\?id\=(.*)\&RSSLINK\=(.*) productdetails.aspx?id=$1 [R=302, NC]

Thanks,

Brad

  • 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-17T10:43:30+00:00Added an answer on June 17, 2026 at 10:43 am

    This is because what you are trying to do is invalid. You can’t access the query string through the regexp match pattern — its not allowed. You have to use a rewrite condition to pick up the query string, for example:

    RewriteCond %{QUERY_STRING}          PromotionID=(.*?)&id=(.*) [NC]
    RewriteRule ^/ProductDetails\.aspx$  productdetails.aspx?id=%2 [R=302,NC,L]
    

    You can create a ladder of these and put a catchall at the bottom

    RewriteCond %{ENV:REDIRECT_STATUS}   ^$
    RewriteRule ^                        /catchall.txt [L]
    

    This will do an internal redirect of any request that wasn’t matched by the previous rules to your catch all. The condition is there to stop an infinite redirection loop.

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

Sidebar

Related Questions

I have the following rewrite rules: RewriteRule ^/events$ /pagebase.php?pbid=3627 [QSA,L,I] RewriteRule ^/events-list$ /pagebase.php?pbid=3663 [QSA,L,I]
I have the following situation with url rewrite rules which are getting conflicted with
I have the following .htaccess to rewrite my domain.com/ to domain.com/public/ # Rewrite rules
I have the following rewrite rules: <IfModule mod_rewrite.c> RewriteEngine on RewriteBase / # Route
I have an issue with my .htacess Rewrite Rules... I have the following rule:
i have in a file rewrite.php following rules $rewrites = array( '#^/searchresults.html$#' => '/info/searchresults'
I have the following rewrite rules: RewriteRule ^products/([a-zA-Z]+)$ /project/clients/index.php?database=$1&module=products [L,QSA] The directory structure is:
I have the following rewrite rules <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteCond %{REQUEST_FILENAME}
I have the following rewrite rules in my .htaccess file: RewriteEngine on RewriteRule ^news/([0-9]+)/?$
I have the following rewrite rules: #remove the www. RewriteCond %{HTTP_HOST} ^www.website.co.uk$ [NC] RewriteRule

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.