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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T09:20:19+00:00 2026-05-24T09:20:19+00:00

I’m wanting to rewrite Word Press urls using mod_rewrite in my .htaccess file in

  • 0

I’m wanting to rewrite Word Press urls using mod_rewrite in my .htaccess file in the following ways:

http://blog.com/content/themes/twentyeleven/style.css

to

http://blog.com/wp-content/themes/twentyeleven/style.css

and

http://blog.com/inc/css/admin-bar.css?ver=20110622

to

http://blog.com/wp-includes/css/admin-bar.css?ver=20110622

and

http://blog.com/admin/post.php?post=1&action=edit

to

http://blog.com/wp-admin/post.php?post=1&action=edit

I’m trying to hide the fact that this website is using Word Press, and all links have been rewritten on the fly using PHP. However I want the server to rewrite the links back to the correct Word Press ones as above.

In case it helps, I’ve prepended a file (in my php.ini file) to the WordPress index.php file which calls the ob_start(); function and then appended the following file:

<?php
$html = ob_get_contents();
ob_end_clean();
$html = str_replace("wp-content", "content", $html);
$html = str_replace("wp-admin", "admin", $html);
$html = str_replace("wp-includes", "inc", $html);
echo $html; 
?>

Some people may question why I want to hide the fact that we’re using Word Press. There are many reasons (security being one of them) but that’s not really the point to this question.

What code can I add to my .htaccess file that would let me rewrite the urls but keeping the correct query strings such as ?ver=20110622 or ?post=1&action=edit

  • 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-24T09:20:20+00:00Added an answer on May 24, 2026 at 9:20 am

    The [QSA] flag will maintain the query string when rewriting the URL. Example:

    RewriteRule ^content/(.*?) wp-content/$1 [QSA]
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a .ini file as follows: [playlist] numberofentries=2 File1=http://87.230.82.17:80 Title1=(#1 - 365/1400) Example
I'm using v2.0 of ClassTextile.php, with the following call: $testimonial_text = $textile->TextileRestricted($_POST['testimonial']); ... and
We are using XSLT to translate a RIXML file to XML. Our RIXML contains
I'm not entirely sure how I managed to jack this up. http://pretty-senshi.com If you
link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I have just tried to save a simple *.rtf file with some websites and
I am using the SimpleRSS gem to parse a WordPress RSS feed. The only
I want use html5's new tag to play a wav file (currently only supported
In my XML file chapters tag has more chapter tag.i need to display chapters

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.