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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T07:20:34+00:00 2026-05-26T07:20:34+00:00

On my localhost, there is no problem, but when I upload my .htaccess file

  • 0

On my localhost, there is no problem, but when I upload my .htaccess file to my 1and1 hosting account I hit a brick wall (an internal 500 server error)

Update: I found the offending code, just don’t know why its broken or how to fix it (I commented out the broken line)

 #RewriteRule ^([a-zA-Z_\-/]+)(\/?)$ index.php?p=$1 [R,NC,QSA,L]
  RewriteRule ^([a-zA-Z_/]+)(\/?)$ index.php?p=$1 [R,NC,QSA,L]

.htaccess file contents:

AddType x-mapp-php5 .php   
RewriteEngine on
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !\.(jpg|jpeg|gif|png|css|js|pl|txt)$
RewriteRule ^([a-zA-Z_\-/]+)(\/?)$ /index.php?p=$1 [L]

Commenting out the final line (RewriteRule…) stops the error from happening but I obviously need this to function.

The file works fine for me on my local machine.
Well its a little different so I’ll include that code too
(differences: flags, ‘/NEP’, and the 1st line)

RewriteEngine on
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !\.(jpg|jpeg|gif|png|css|js|pl|txt)$
RewriteRule ^([a-zA-Z_\-/]+)(\/?)$ /NEP2/index.php?p=$1 [NC,QSA,L]

An couple examples of the rewrites I am trying to perform:

  • dev.mydomain.com/services/ => dev.mydomain.com/index.php?p=services

  • dev.mydomain.com/quality/control => dev.mydomain.com/index.php?p=quality/control

Any help/advice you are able to give would be greatly appreciated. I really need to make this work by the end of the day.

  • 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-26T07:20:35+00:00Added an answer on May 26, 2026 at 7:20 am

    The hyphen/dash in a character set functions as a range operator (think 0-9 or a-z). Having it in the middle or end of can be problematic.

    Moving it to the beginning of the character set avoids this issue and means you won’t have to escape it with a \:

    [-a-zA-Z_/]
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I know that there is a lot of posts about this problem.But can someone
I'm using URLRewriter , but there is a problem, it re-write all addresses, even
i use such code, but it renders with error <li class=dd0><div id=dt1<a href=http://localhost:1675/Category/29-books.aspx>Books</a></div></li> there
where used on http://localhost:8692/Contacts/Default.aspx Response.Redirect( http://www.google.com ) redirects to http://localhost:8692/Contacts/http%3a%2f%2fwww.google.com The problem just appeared
I want to upload my custom maven plugin to nexus repository. My problem is
This seems like a fairly simple problem to me but I have been having
it should works but hitting the submit button redirect my page to http://localhost:8082/sign (http://localhost:8082
I have searched on google and stackoverflow for this problem there are several questions
I am working around in a problem where i need to create an upload
There have been plenty of articles on using the SharpSSH component but i nonetheless

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.