2

I have a url in my application:

www.example.com/application/30201:1234

I hit this URL its throws an error.

Forbidden

You don't have permission to access /application/30204:1234 on this server.

Main config for rules is as follow:

'rules'=>array( '<call:[0-9]+\:[0-9]+>( sip<sip:(\:[A-Za-z0-9]*@infocus\.net)+>)?( email<email:(\:[A-Z0-9a-z\._%\+\-]+@[a-zA-Z0-9.-]+\.[A-Za-z]{2,4})+>)?'=>'user/index', '<controller:\w+>/<id:\d+>'=>'<controller>/view', '<controller:\w+>/<action:\w+>/<id:\d+>'=>'<controller>/<action>', '<controller:\w+>/<action:\w+>'=>'<controller>/<action>', ),

I want to add rewrite rule in .htaccess which will redirect my application to user/index.

Lalitesh Upadhyaya
  • 311
  • 1
  • 4
  • 14
  • Can you show your Virtual Host definition for this domain. It should be in `\wamp\bin\apache\{apacheversion}\conf\extra\httpd-vhost.conf` – RiggsFolly Dec 09 '14 at 09:19
  • Application is not running on root. That is the problem – Lalitesh Upadhyaya Dec 09 '14 at 09:50
  • Well in that case create a Virtual Host which will give it its own DocumentRoot. Frameworks and CMS's always work better in a VH. See [this for some help creating a Virtual Host](http://stackoverflow.com/questions/23665064/project-links-do-not-work-on-wamp-server/23990618#23990618) – RiggsFolly Dec 09 '14 at 12:18
  • I want apache to treat these numericals values as params: www.example.com/application/30201:1234 And for this I have to change the .htaccess file. I tried the modrewrite with regex but they are not working. – Lalitesh Upadhyaya Dec 10 '14 at 04:40

1 Answers1

0

Add this line in your .htaccess file when you hit the first url it will redirect to next url

Redirect /root_directory/first_url_path /root_directory/second_url_path
Luc M
  • 16,630
  • 26
  • 74
  • 89