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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T11:47:04+00:00 2026-05-26T11:47:04+00:00

I need a rewrite rule that allows full stops. How can I allow for

  • 0

I need a rewrite rule that allows full stops. How can I allow for this? What I want is for
shop/domain/www.test.com to become shop/domain/controller.php?param1=www.test.com

The original rule I have is below:

RewriteRule ^shop/domain/([^/.]+)/?$ shop/stock/controller.php?param1=$1 [NC]

This works but only if I remove the full stop.

I have also tried the following:

RewriteRule ^shop/domain/([^/]+)/?$ shop/domain/controller.php?param1=$1 [NC]

This allows the full stop but then has controller.php is the parameter when it should be http://www.test.com.

  • 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-26T11:47:05+00:00Added an answer on May 26, 2026 at 11:47 am

    If all domains begin with “www.”, you could do this

    RewriteRule ^shop/domain/www\.([^/]+)/?$ shop/domain/controller.php?param1=$1 [NC,L]
    

    The problem with your rule is, that it also matches controller.php as if it were a domain. You can add the following two rewrite conditions to prevent this:

    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteRule ^shop/domain/([^/]+)/?$ shop/domain/controller.php?param1=$1 [NC,L]
    

    !-d means not an existing directory, !-f means not an exisiting file (e.g. controller.php).

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

Sidebar

Related Questions

I need a rewrite rule for this url http://localhost/~user/frame/lib/index.php?/controller/method/12/22/ How can i rewrite it
I need a rewrite rule that will do an internal redirect from: <domain>/directory/<anything>/<anything>.php to:
I have a rewrite rule that rewrites domain.co.uk/member.php?x=$member to domain.co.uk/$member It looks like this:
I need a rewrite rule that uses only one parameter. <rewrite url=~/(.+).aspx to=www.mysite.com/results?search=$1 />
This is the rewrite rule that I am working with: RewriteRule (.*\.(jpe?g|gif|bmp|png))$ http://www.newurl.com/?image=$1 What
Getting confused and stuck on syntax for a rewrite rule. Need to allow for
I need to write a URL Rewrite rule for my IIS 7.5 website that
I have the following page: www.domain.com/index.php?route=information/contact and I'd like to rewrite it so that
I need a rewrite rule that will take a folder (dynamic) and rewrite it
I currently have a simple rewrite that redirects /photos/2 to /photoviewer.php?photo=2 However I need

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.