Giter Site home page Giter Site logo

mod_rewrite required? about dispatch HOT 4 CLOSED

noodlehaus avatar noodlehaus commented on August 23, 2024
mod_rewrite required?

from dispatch.

Comments (4)

bmcminn avatar bmcminn commented on August 23, 2024

Hey @waltervi,

Just looked through the 4.x branch for Dispatch and didn't see anything on .htaccess either. Pretty sure the original Dispatch PHP site had a demo .htaccess I used to get started, but it's no longer up far as I can see. Here's the .htaccess I use:

<IfModule mod_rewrite.c>
  RewriteEngine on
  # in this case, our app bootstrap file is index.php
  RewriteRule !\.(js|html|ico|gif|jpg|png|css|woff|eot|svg)$ index.php
</IfModule>

@noodlehaus Documentation on this would probably help clear up a bit of confusion for newcomers to routing in PHP.

I could write up a section on this and issue a pull request if needed?

from dispatch.

waltervi avatar waltervi commented on August 23, 2024

Hi Brandtley!

I think (IMHO) that this part related to mod_rewrite should be added to the docs, just a little example of an .htaccess file, and say: "mod_rewrite is needed".

I know most people working with a library like this "should have to know/figure out this", but what about someone who is just starting?

I'm writing my own now. And I will post it here later.

Thanks for the fast reply.

=)

from dispatch.

bmcminn avatar bmcminn commented on August 23, 2024

Dig it. Something else you can do is run PHP's internal server mechanism as a testing environment for getting your project up and running without worrying about apache until later.

$ php -S localhost:3051 index.php

More info here: http://php.net/manual/en/features.commandline.webserver.php

from dispatch.

noodlehaus avatar noodlehaus commented on August 23, 2024

thanks for raising this. documentation has been updated to include example configurations for both apache and nginx.

from dispatch.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.