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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T14:49:02+00:00 2026-05-17T14:49:02+00:00

I moved my site to different server since then my all urls started showing

  • 0

I moved my site to different server since then my all urls started showing up 404 error.

earlier my all urls were like this mysite.com/title-of-url

but now all such urls are getting 404 error, so i disabled seo friendly url feature on site admin and now i can access same page on
mysite.com/index.php/title-of-url

i tired to create some regex for .htaccess to do purpose like
RewriteRule ^([^/.]+)/?$ /index.php/$1 [L]

but its working fine one depth of “/”, i mean its working for mysite.com/first but not for mysite.com/first/second

I am looking for REGEX help regardng it so that
mysite.com/first/second should gets rewritten to mysite.com/index.php/first/second as well as mysite.com/something gets rewritten to mysite.com/index.php/something..

looking forward for your kind help
Thanks

  • 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-17T14:49:02+00:00Added an answer on May 17, 2026 at 2:49 pm

    Of course it doesn’t work with more /. Your rule says:

    • Match from beginning: ^
    • (start grouping for $1: ()
    • Match everything except the slash: [^/]+
    • (end grouping: ))
    • Match an optional leading slash /?
    • Match to the end $

    If you really want to match everything, use a dot instead of a character class, matching everything except the /:

    RewriteRule ^(.+?)/?$ /index.php/$1 [L]
    

    Do not forget to include a RewriteCond before it excluding existing files and directories, to avoid an infinite recursion. Fail to do this, and you’ll end up with a 500 Internal Server Error. Complete code:

    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.+?)/?$ /index.php/$1 [L]
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I just moved my Wordpress site to a different server and url. All the
I moved my site from local to the server and the rewrite rules in
I have just moved a site from a dedicated server to a GoDaddy shared
Capistrano and Git worked properly till I moved my site to another server. My
I have just moved the dev site over to my linux server for production
I've just moved a Joomla 1.7 site to a new server. Administration back-end works
All, I have moved my hosted dnn 6 site to my local pc. Locally
I have the following error with my ASP.NET web site. I have just moved
I have moved my drupal site from one mysql server to another one. Old
I have just moved a php site to a new server. One of my

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.