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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T01:28:02+00:00 2026-05-31T01:28:02+00:00

Hi im trying to rewrite myweb.com/ivan to a simple url. I got this on

  • 0

Hi im trying to rewrite myweb.com/ivan to a simple url.

I got this on .htaccess in my root directory:

RewriteEngine On
    RewriteRule ^/something$ index.php?page=anunciante&anunciante=something [L,NC]
    RewriteRule (.*)/?restaurantes/(.+)?$ index.php?page=anunciante&anunciante=something [L,NC]

Yes, both are the same. If i try to enter myurl.com/ivan i get ‘Not found’,but if i try to enter myurl.com/restaurantes/something i get into index.php with no problem. In my index.php i have this:

 print_r($_GET); die();

So with myurl.com/restaurantes/something i get:

Array ( [page] => anunciante [anunciante] => something )  

(like expected)
But i dont know why this not work with myurl.com/ivan
I also tried modifying the rule like:

  RewriteRule ^/?ivan$ index...
  RewriteRule ^ivan$ index...
  RewriteRule ^/ivan index...

All no succed. Also i dont know where is asking for ‘favicon.ico’..
And here is the mod_rewrite log:
asking for myurl.com/something
Log: http://pastebin.com/283kq3R8

asking for myurl.com/restaurantes/something
http://pastebin.com/5QcyuAuW

  • 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-31T01:28:03+00:00Added an answer on May 31, 2026 at 1:28 am

    As posted by @Gerben, do not preface your rule with /.
    Try:

    RewriteEngine On
    RewriteRule ^ivan$ index.php?page=anunciante&anunciante=ivan [L,NC]
    RewriteRule (.*)/?restaurantes/(.+)?$ index.php?page=anunciante&anunciante=something [L,NC]
    

    http://myweb.com/ivan
    http://myweb.com/restaurantes/something

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

Sidebar

Related Questions

I'm trying to rewrite http://www.example.com/directory/folder/* to http://www.example.com/directory/* the htaccess file is in directory this
I'm trying to rewrite a url of this: http://www.foo.com/bar/baz to index.php?q=$1&d=baz Where bar is
I am trying to write RewriteRule to redirect www.myweb.com/download/blabla.zip to > www.myweb.com/download/download.php?filedownload=blabla.zip this is
I'm trying to rewrite this url: http://www.example.com/user.php?user=username into http://example.com/username I'm using this code in
I am trying to rewrite a URL using .htaccess. I am running on Apache
I am trying to rewrite url from www.xxx.com/test.com to www.xxx.com/my.php?d=test.com using the following directive:
i am trying to rewrite any URL that match this pattern: ~/Ahmed ~/Name to
I'm trying to rewrite search results page url to something like /search/query-1.html but when
I'm trying to rewrite an url from: http://domain.com/aa/whatever/whatever.php to http://domain.com/whatever/whatever.php?language=aa However, depending on existing
I'm trying to rewrite the following into htaccess using - redirect 301 redirect mysite.com/longname/{20

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.