friendly-url

modx revo friendly urls

落花浮王杯 提交于 2019-12-12 04:39:51
问题 Just started to use MODX Revo. When I make new document in MODX(Revo), fill its alias (for example ' TESTALIAS ') and trying to get mydomain/TESTALIAS I'm receiving mistake 404 . Using nginx and php-fpm, FURLs are ON in .htaccess So what am I doing wrong? Thank you very much 回答1: If you have built the site, browsed around a bit and THEN turned on furls, clear your modx cache. [actually delete all the files] Also make sure that not only furls are enabled in modx but that: Use Friendly Alias

Regular Expression For URL Query

蹲街弑〆低调 提交于 2019-12-12 04:12:21
问题 I've been using mod_rewrite in my htaccess file to rewrite my urls and I've run into a problem when doing pagination. Here's the url for my page: http://domain.com/concerts/features/folk-roots?page=2 htaccess file: RewriteRule ^features/([^/]*)?page=([0-9]*)$ featureCat.php?cat=$1&page=$2 [NC,L] It works fine without the page query, but if I want to change pages I can't figure out how to write the regular expression to grab the page #. Any ideas would be appreciated! 回答1: You need to use

FriendlyID doesn't build HTML escaped slugs

非 Y 不嫁゛ 提交于 2019-12-12 03:49:12
问题 I have friendly_id setup properly and everything works, using slugs. The issue I am having is that some of the names on my Tag model (which is the model that FriendlyId is attached to) need to be HTML escaped. Names like c++ or .net . When I ran Tag.find_each(:&save) , it generated all the slugs for me....but on those tags with those names, this is what happened: > c = Tag.where(:name => "c++") Tag Load (0.9ms) SELECT "tags".* FROM "tags" WHERE "tags"."name" = 'c++' => [#<Tag id: 2, name: "c+

rewrite my url, remove query string and make new pretty url

半城伤御伤魂 提交于 2019-12-12 03:12:39
问题 I want to rewrite my url from http://website.com/preview.php?id=puzzled to http://website.com/cv/puzzled and from http://website.com/resume.php?id=puzzled to http://website.com/puzzled ... but seems i am failed to get this result. Options +FollowSymLinks RewriteEngine on RewriteCond %{SCRIPT_FILENAME} !-f RewriteRule ^([0-9a-zA-Z-]+) /resume.php?id=$1 [QSA,L] RewriteRule ^cv/([0-9a-zA-Z-]+) /preview.php?id=$1 [QSA,L] 回答1: You can use these rules: Options +FollowSymLinks RewriteEngine on

Htaccess rule to make urls like this ?page=1 look like /page/1 in Codeigniter

六月ゝ 毕业季﹏ 提交于 2019-12-12 03:08:31
问题 This is how my urls currently look: http://mysite.com/?page=1 How can I make this work?: http://mysite.com/page/1 There is a post on StackOverflow that asks the same question. But the accepted solution isn't working for me. Because I am using Codeigniter and my page results in a 404 perhaps because since the url pattern of a CI site is: domain/controller/method The system is assuming that I am requesting a controller called "page" and a method called "1" both of which of course doesn't exist.

.htaccess rewriting rule rewriting css files

笑着哭i 提交于 2019-12-12 02:27:40
问题 I have a rewrite rule to make pretty url but its rewriting css, js and other files too. I want to rewrite http://localhost/example/post/?postid=af1ub4zu4y&title=this-is-the-first-post.html to http://localhost/example/post/af1ub4zu4y/this-is-the-first-post.html I am trying this way Options +FollowSymlinks -MultiViews RewriteEngine on RewriteBase / RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^post/([^/]*)/(.*\.html) /example/post/?postid=$1&title=$2 [QSA

have different static url in dynamic page

╄→尐↘猪︶ㄣ 提交于 2019-12-12 01:33:11
问题 I have a website where each person has his personal profile. I would like to have static URL like mywebsite/user1 , mywebsite/user2 , but actually I would remain in the same page and change the content dynamically. A reason is that when I open the site I ask to a database some data, and I don't want to ask it each time I change page. I don't like url like mywebsite?user=1 Is there a solution? Thank you [EDIT better explenation] I have a dynamic page that shows the user profile of my website.

angularjs ngroute with html5mode(true) on apache fails

拟墨画扇 提交于 2019-12-12 00:16:30
问题 I am trying to use ngroute with $locationProvider.html5Mode(true) and a htaccess rewrite, but I can't get it to work. When I try to access for example http://localhost/angular_blog/article/someTitle I get the following error in my console: blogApp.js:1 Uncaught SyntaxError: Unexpected token < blogCtrl.js:1 Uncaught SyntaxError: Unexpected token < angular.js:38 Uncaught Error: [$injector:modulerr] http://errors.angularjs.org/1.3.15/$injector/modulerr?p0=blogApp&p1=Error%3…gleapis.com%2Fajax

Pretty URL's with CodeIgniter

北城余情 提交于 2019-12-11 21:26:49
问题 I'm fairly new to CI and have been trying out how to produce clean URL's. I have accomplished this task before without using a framework by editing my .htaccess file as follows. RewriteCond %{REQUEST_URI} !^/(css|js|img)/ RewriteRule ^profile/([^/]*)$ profile.php?id=$1 [L] With CI, I have tried the following: #Get rid of the index.php that's in the URL by default RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ index.php/$1 [L] #

Are friendly URLs based on directories?

房东的猫 提交于 2019-12-11 14:24:10
问题 I've been reading many articles about SEO and investigating how to improve my site. I found an article that said that having friendly URLs help online indexers to find and positionate your site better than using URLs with lots of GET parameters so I decided to adapt my site to this kind of URL. I've also read that there's a way (editing .htaccess) but it's not the best way and it doesn't look really good. For example, that's how Google's About URL looks like: https://www.google.com/search