- Where Developers Learn, Share, & Build Careers


I'm not very good at htaccess, so here's some help looking for help. I have a web app running on

  myserver.com/index.html   

and I'm sending the request ( GET , PUT, delete an administrator ):

  myserver.com/controller.php?id=5   

is there a way I can use

  myserver.com/controller/5   

I have toyed with my htaccess , but like Manage to create 500 errors while attempting to hit the index.html page to deposit via a url ...

If you send a request: myserver.com/controller/5 < / Code> and you want to rewrite it at /controller.php?id=5 , you can use these rules:

  RewriteEngine RewriteCond% {REQUEST_FILENAME}! -f Rewrite Convert% {REQUEST_FILENAME}! -d Records Rules ^ /? ([^ /] +) / ([^ /] +) $ / $ 1.php? Id = $ 2 [L]   

Or less common:

  Reviving OnReitRound% {REQUEST_FILENAME}! -f rewrite %% {REQUE ST_FILENAME}! -d Records Rules ^ /? Controller / ([^ /] +) $ /controller.php?id=$1 [L]    

Comments

Popular posts from this blog

Python SQLAlchemy:AttributeError: Neither 'Column' object nor 'Comparator' object has an attribute 'schema' -

java - How not to audit a join table and related entities using Hibernate Envers? -

mongodb - CakePHP paginator ignoring order, but only for certain values -