FAQ Database Discussion Community


My domain www.digitalproductshopping.com is on a WordPress installation, Can I add a sub-directory that is html5

html5,wordpress,url-rewriting,url-routing
Can I have a HTML5 Sub Directory as part of my WordPress installation. I have put the subdirectory in public.html folder, but when i enter the URL www.digitalproductshopping.com/affiliatemoneysecret, I get a page not found 404 error on this URL.

How to use regexp get url pattern in golang?

regex,http,go,url-routing
How to use regular expression matching URL, which does decide to use the corresponding function processing package main import( "fmt" "net/http" ) func main() { http.HandleFunc("/pattern", resolve) http.ListenAndServe(":8080", nil) } func resolve(w http.ResponseWriter, r * http.Request) { fmt.Println(r.URL.Host) } ...

Symfony/Twig how to render a Route set by anotation?

php,symfony2,routing,twig,url-routing
Let's say I have this code in a controller: <?php namespace Foo\BarBundle\Controller; use Symfony\Bundle\FrameworkBundle\Controller\Controller; use Sensio\Bundle\FrameworkExtraBundle\Configuration as Mvc; /** * @Mvc\Route("/foo/bar") */ class TestController extends Controller /** * @Mvc\Route("/test/{id}", requirements={"id" = "[0-9]{1,6}"}) * @Mvc\Template * * @return view */ public function testAction($id) { return array('test' => $id); } } How...

Laravel URLs with query parameters

laravel,url-routing,laravel-routing,laravel-5
I want to implement a link in my application, but instead of it following this format: /origin/{number} I want it to look like this: /origin=number How do I implement a route successfully which will understand this link format? Surely Laravel is flexible enough to not only be able to parse...

$location.path get me previous path [closed]

javascript,angularjs,url-routing,angular-ui-router
I'm new in angularjs and I want to get current state url but when i use $location.path() function its give me last state that i click on it for example in this plunker that i made when i click on dashboard at first i get empty string after i click...

Routing in Express.js

node.js,express,url-routing
I am currently express router in Node.js and having a problem like below. Let's say I have two url; one is to get a user info and one is to register users to an application. http://example.com/users/:idUser (this will give a information of a user) http://example.com/users/registration (this will allow a user...

Laravel 5 check whether a user is logged in

authentication,laravel,filter,url-routing,laravel-5
I am new to Laravel 5 and trying to understand its Auth process. I want to prevent user to reach some of my pages unless the user is not logged in. Trying to make it with Route:filter but it does not work. What i have done wrong ? Route::filter('/pages/mainpage', function()...

process url with filename extension with laravel

php,laravel,nginx,laravel-4,url-routing
I currently using laravel 4.2 and nginx, now when i what to process the get request like '/img/300/200/dummy.png' with laravel controller, but it seems go to the files under the public folder , and not trig a laravel Route. how can i write controllers to process such url?

How do I sort Flask/Werkzeug routes in the order in which they will be matched?

flask,url-routing,werkzeug
I have a function that I'm using to list routes for my Flask site and would like to be sure it is sorting them in the order in which they will be matched by Flask/Werkzeug. Currently I have def routes(verbose, wide, nostatic): """List routes supported by the application""" for rule...

Unable to route to static PHP page in CodeIgniter

codeigniter,url-routing
I'm a newbie to CodeIgniter. In my 'views' folder, I've created 2 PHP pages - home.php and register.php. I've also created the header and footer PHP pages in a templates folder. Here is my pages.php code which is the controller class: <?php class Pages extends CI_Controller { public function view($page)...

Routing in SAPUI5: How to implement passing of URL? Model data not initialy loaded

url-routing,sapui5,openui5
My goal is to write a SAPUI5 Fiori app with routing support. One mail goal is to have passable URLs. For example in an E-Mail like "please approve this: link". The link is an URL matched by my rounting config, e.g.index.html#/applicants/8. I use a typical sap.m.SplitApp kind of application. Clicking...

Debug Angular Dart routing

dart,url-routing,angular-dart
My first few days of using Angular Dart have been delightful... ... except for the routing, which continues to give me problems. What I want is: /product to show me a list of products / to be an alias for /product (ie, /product is the default view) /product/:id to view/edit...

Laravel 5 routing not working when using slashes inside groups?

url-routing,laravel-5
I am facing a little weird problem with a simple routing in Laravel 5. Below, I have to commented code snippets. // It works when I call /tribut.updateStatus URL $router->group(['prefix' => 'admin', 'before' => 'isLogged|isAdmin'], function ($router) { $router->resource('tribut', 'Admin\TributController'); $router->get('tribut.updateStatus', 'Admin\[email protected]'); }); // Does not work when I call:...

MVC routes with dynamic values

c#,asp.net-mvc,asp.net-mvc-4,routes,url-routing
I am struggling with the MVC routes I want to get the following URLs; example.com/sector/ example.com/sector/ddmmyyy/ example.com/sector/ddmmyyy/article-with-seo-url/ All 3 values are dynamic (Sector / Date / SEOURL). I can get No.1 (/sectors/) working with: routes.MapRoute( "sectors", "{seourl}", new { controller = "NewsArticle", action = "sectors" } ); However I'm not...

Yii2 url routing to get a string parameter

php,url-routing,yii2,yii-url-manager
I have a url like this http://localhost/yii2/category/my-custom-string-parameter I need to get the text my-custom-string-parameter And I setup the rules like this 'urlManager' => [ 'class' => 'yii\web\UrlManager', 'showScriptName' => false, 'enablePrettyUrl' => true, 'rules' => array( '<controller:\w+>/<id:\d+>' => '<controller>/view', '<controller:\w+>/<action:\w+>/<id:\d+>' => '<controller>/<action>', '<controller:\w+>/<action:\w+>' =>...

Django: call index function on page reload

python,django,url-routing
I was wondering how to call my index(request) function thats in views.py upon every page reload. Currently index(request) only gets called when the app originally loads. Every other page reload after that calls another function in views.py called filter_report(request). The problem I am running into is that 85% of the...

Rails getting root_url wrong

ruby-on-rails,ruby,redirect,routes,url-routing
We developed a site using Rails 3.2.16 and everything was working fine in development and production environments. The problem came when we changed our domain to something like this: http://live.mysite.com.es After changing our domain almost every route works ok except root_url, which redirects to: http://www.com.es I have tried to tell...

Best way to restrict dynamic URL parameters matched to an AngularJS state

javascript,angularjs,url-routing,url-parameters
Currently I have a state url defined as: …/:table/edit/:id -> Consequently both urls: …/products/edit/5 & …/notValidTable/edit/5 load my tableEdit state as defined below: tableEdit.state.js: angular.module(‘myApp') .config(function($stateProvider) { $stateProvider .state('tableEdit', { url: '/:table/edit/:id', templateUrl: ‘../table_edit/table_edit.html', controller: 'TableEditCtrl' }); }); Q - As I know my ‘:table’ param in tableEdit should only...

Rails routing: What does only: [] do here?

ruby-on-rails,authentication,devise,url-routing
I saw a piece of Rails code for routing like this: namespace :my do resource :auth_states, only: [] do collection do get 'signed_in' end end resource :password, only: [:edit, :update] # And all the actions a logged in user can perform under "my" namespace... # ... end Supposedly this app...

Why does AWS Elastic Beanstalk Python insert a 'static' rule ahead of all others in priority?

amazon-web-services,flask,url-routing,elastic-beanstalk,werkzeug
The 'static' routing rule for my Python application is behaving strangely in my AWS Elastic Beanstalk application (and nowhere else), appearing to override all other rules. For example, using the two functions below, on both my development machines and test servers elsewhere and on AWS, routes list the static rule...

including external JS for a specific view in Rails

javascript,ruby-on-rails,ruby,url-routing
I am trying to use Ruby on Rails to build my first website. I have read about the asset pipeline and I have a specific view that needs to reference 3 JS libraries that no other files need to reference. I don't want to use them as require directives in...

htaccess set http on all pages except login page

.htaccess,url-routing
I used an example from another Stack post to force http on my site for all pages except for a user login page. I don't know if I am missing anything, but this did not work: # Turn SSL on for login RewriteCond %{HTTPS} off RewriteCond %{REQUEST_URI} ^customer/login/ [NC] RewriteRule...

Cakephp 2.6 how do I return to the main application after entering a plugin

cakephp,plugins,url-routing,cakephp-2.6
I am using Luis Dias' Report Manager Plugin to generate some quick reports for an application I am developing. From my application dashboard I enter the plugin using the following: <td style="text-align:center"> <button style="height:75px; width:175px; background-color:BurlyWood; font-size:20px; font-family:Verdana" onclick="window.location.href='<?php echo Router::url(array('controller'=>'report_manager' ,'action'=>'reports'))?>'">Report Management</button> I'd really like to open the Report...

Silex, in symbollically liked subdirectory, does not route

php,.htaccess,url-routing,symlink,silex
I have a Silex project. Works on localhost(using php.exe) but I've just transferred it to a subdirectory of an existing website. For example: www.website.foo/silex/ On the site, because of funky existing routing, the silex app is symbolically linked in the webroot under a /silex/ folder, but is actually elsewhere in...

How to make morre readable URIs using unique-id-plus-redundant-information (UPRI) using PHP with Laravel

rest,laravel-5,url-routing
I would like to know the best (and most consistent) way to add redundant bits to my restful uris so that they are more readable while remaining unchanging when some things such as username change. I read of the concept at this excellent blog post and it is something like...

Call function in a Controller from Routes

php,codeigniter,url-routing
I have been searching for an answer to this, but haven't really found the real solution. I learned a bit of Laravel recently, and it had this type of routing: Route::get('home', '[email protected]'); As of now, I have left Laravel and am fiddling with CodeIgniter. The routing I have here is:...

Rails route to get a resource using query string

ruby-on-rails,routing,url-routing
I would like to have a custom route querystring based, to access a specified resource. For example: /opportunities/rent/san-miguel-de-tucuman?id=45045 That route should map to the action OpportunitiesController#show, with the resource id 45045. Thanks in advance!!! Updated This are my current routes: get 'oportunidades/alquiler/san-miguel-de-tucuman/:id', to: "opportunities#show" get 'oportunidades/alquiler/san-miguel-de-tucuman', to: "opportunities#index" So, if...

angularjs v1.3.15 deep linking / routing / path no longer working with hashtag (Migrated from v1.2.3)

angularjs,url-routing,hashtag,deep-linking,angularjs-1.3
I am very new to angular and working on some code that I wanted to upgrade the angular version from 1.2.3 to 1.3.15 (which I have also never done before). When I did, the navigation links on my index page stopped working; rather it seems like the router.js falls through...

Why has overriding password hashing caused urls to break in magento admin?

php,magento,url-routing
I have overriden the hash($data) and validateHash($password, $hash) of Mage_Core_Model_Encryption in a custom module. It works I can login to the admin area with my password and it validates correctly with the new hash; however, I cannot navigate in the admin area. I see a password-like hash becomes part of...

Laravel Routing with different amount of paramenters

php,laravel,laravel-4,url-routing
I'm trying to accomplish the to control my function by the follwoing routes: Route::get('tri/{uniquename}/photos/gallery/{pic}', array( 'as' => 'sportevent', 'uses' => '[email protected]')); Route::get('tri/{uniquename}/{tab}/{filter}/', array( 'as' => 'sportevent', 'uses' => '[email protected]')); Route::get('tri/{uniquename}/{tab}/', array( 'as' => 'sportevent', 'uses' => '[email protected]')); I'm aware, that I could combine route 2 and 3 to...

Check for relative URL in JavaScript before redirecting

javascript,url-routing
I'm wanting to do a check in JavaScript that the URL passed in to redirect to is a relative URL and not an absolute one. I've looking at doing something similar to this snippet though would like to know if there is a better way of achieving this? var relativePath...

Laravel 5 link does not work properly

php,laravel,url-routing,laravel-5,laravel-routing
I am new to Laravel 5 Framework and I have a link as <a href="http://localhost:8080/AutoQlik/public/pages/aracislemler/?page=2">2</a> and its route is already defined as Route::get('/pages/aracislemler', '[email protected]'); but when i click it, it goes to http://localhost:8080/pages/aracislemler?page=2 What might cause to this problem ? Any help would be appreciated....

Dynamic url routing in django

django,django-views,url-routing
I have a RoutingUrl model which describes all the urls used on my site with the view (foreign key to the View model) that has to manage the url and some other routing information. The urls are continuously growing in size, and should also support the redirect. The models are...

Creating a sub-page in CodeIgniter using URL routing

php,codeigniter,url-routing
I have a form which is starting to get a bit too complex, so I want to split one page into three different pages. I understand that I need to use URL routing to achieve this, but no luck so far. Reading the manual didn't help. Current URL is as...