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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T21:34:44+00:00 2026-05-21T21:34:44+00:00

Calling all .htaccess gurus. I need your help! I’m trying to force a rewrite

  • 0

Calling all .htaccess gurus. I need your help!

I’m trying to force a rewrite to include #! in the urls.

So basically I need.
http://example.com/biography

To be re-written to
http://example.com/#!/biography

If it will make any difference my rewrite rules so far are

  RewriteEngine On
  RewriteCond %{HTTPS} !=on

  RewriteCond %{HTTP_HOST} ^www\.(.+)$ [NC]
  RewriteRule ^(.*)$ http://%1/$1 [R=301,L]

  RewriteCond $1 !^(images|system|files|themes|static|favicon\.ico|robots\.txt|index\.php) [NC]
  RewriteRule ^(.*)$ /index.php/$1 [L]

I suck at this stuff so any help will be greatly appreciated.

Additionally…

I have this test doing what I need it to do in this htaccess tester. http://htaccess.madewithlove.be/ But it won’t work when I try it on my site…

RewriteCond %{REQUEST_URI} !^/#!
RewriteRule ^(.*)$ /#!/$1 [L]

No ideas as to why it won’t work?

Thanks,
Mark.

  • 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-21T21:34:45+00:00Added an answer on May 21, 2026 at 9:34 pm

    Have your .htaccess like this:

    Options +FollowSymlinks -MultiViews
    RewriteEngine on
    
    RewriteCond %{HTTPS} !=on
    RewriteCond %{HTTP_HOST} ^www\.(.+)$ [NC]
    RewriteRule ^(.*)$ http://%1/$1 [R=301,L]
    
    RewriteRule ^(biography)/?$ /#!/$1 [R,L,NE,NC]
    
    RewriteCond $1 !^(images|system|files|themes|static|favicon\.ico|robots\.txt|index\.php) [NC]
    RewriteRule ^(.*)$ /index.php/$1 [L]
    

    Remember you cannot have a condition to check for /#! in .htaccess because that part is handled in browsers only and not sent to web server.

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

Sidebar

Related Questions

http://linux.die.net/man/2/mlockall mlockall () locks all of the calling process's virtual address space into RAM,
Calling all AutoMapper gurus! I'd like to be able to map object A to
Calling all MQ Gurus, I have a box under my desk which we use
Calling all the PHP helpers out there. So basically I would like to give
Calling all C macro gurus... Is there any way to write a C macro
Calling all Oracle Gurus! I am in the process of clustering a well tested
Given a BehaviorSubject, what is the practical difference between calling all of these different
I have a list of calling codes for all countries(the phone number prefixes), I
when calling PQconnectdb in the main program all run very well, but if i
Hi All I am currently having an issue calling a WCF service from 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.