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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T22:40:27+00:00 2026-06-17T22:40:27+00:00

I have switched from a Windows Server 2008 R2 running IIS7.5 to CentOS server

  • 0

I have switched from a Windows Server 2008 R2 running IIS7.5 to CentOS server running Apache2, as I had performance problems with PHP.

My main site’s Web.config uses url rewrite and needs to be converted. It has been a while since I last used .htaccess files.
My Web.Config rewrite code:

  <rule name="IndexRewrite" stopProcessing="true">
        <match url="^([^/]+)/?$" />
        <conditions>
            <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
            <add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
        </conditions>
        <action type="Rewrite" url="index.php?p={R:1}" />
    </rule>

So what it does is Rewriting the ?p= That is used by PHP to display the appropriate page.
So, how exactly can this be done? I am not familiar with mod_rewrite in Apache2.

I tried to modify a rewrite rule from another site using SocialEngine, nut no luck.

<IfModule mod_rewrite.c>
  Options +FollowSymLinks
  RewriteEngine On

  # Get rid of index.php
  RewriteCond %{REQUEST_URI} /index\.php
  RewriteRule (.*) index.php?p= [L,QSA]
  # Rewrite all directory-looking urls
  RewriteCond %{REQUEST_URI} /$
  RewriteRule (.*) index.php?p= [L,QSA]


</IfModule>

Example of the link:
http://example.com?p=about
Should be
http://example.com/about


That’s how it was before when I used IIS7.5 Url rewrite.

Any help?

  • 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-17T22:40:28+00:00Added an answer on June 17, 2026 at 10:40 pm

    I have successfully converted it to a working .htaccess mod_rewrite code.
    It seems easier than it is. I had to search deeper in Google and found a working toturial.

    Here’s the code that I use now.

    RewriteEngine On
    RewriteBase /
    RewriteRule ^([A-z]+)$ /index.php?p=$1
    

    So this is solved. 😉

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

Sidebar

Related Questions

As you may have known that I switched from ubuntu to windows from my
We just recently switched from Visual Studio 2008 to Visual Studio 2010. I have
I have just switched from VB.Net to C# and am writing a windows application.
Just switched to Mac from Windows and in ppt on Windows I had an
Recently, I switched my development environment from Windows to Linux. So far, I have
Running php 5.2.5 on Windows Server 2003 (64 bit) and connecting to SQL Server
I've switched from Windows to Ubuntu this week. I have imported my Android project
We are switching from a non-clustered to a 2-node clustered MSMQ Windows Server 2008
I have been switched from windows and ubuntu to macbook and I have researched
I have just switched from svn to mercurial and have read some tutorials about

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.