Working with .htaccess – php

Check to make sure you have mod_rewrite enabled.

  • Find the httpd.conf file (C:\wamp\bin\apache\apache2.4.9\conf\httpd.conf)
  • Inside the httpd.conf file uncomment the line LoadModule rewrite_module modules/ (remove the pound ‘#’ sign from in front of the line)
  • Also find the line ClearModuleList is uncommented then find and make sure that the line AddModule mod_rewrite.c is not commented out.

If the LoadModule rewrite_module modules/ line is missing from the httpd.conf file entirely, just add it.



RewriteEngine on

# map neat URL to internal URL
RewriteRule ^mobile/list/$ RestController.php?view=all [NC,L]
RewriteRule ^mobile/list/([0-9]+)/$ RestController.php?view=single&id=$1 [nc,qsa]

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s