Questions tagged [friendly-url]

A friendly URL is a website address that does not contain a query string or complex strings in the URI, instead relying on a human-readable, SEO-friendly resource path after the website authority (e.g. https://www.stackoverflow.com/questions/tagged/friendly-url).

Filter by
Sorted by
Tagged with
1 vote
2 answers
37 views

How to re-write this double variables url in htaccess in to pretty url

I just want this URL example.com/?cat_page_10=2 into this URL example.com/cat-page/10/2.html the above URL has two (double) vairables 10 and 2 are both are flexable/dynamic variables they will ...
  • 219
1 vote
1 answer
33 views

Rewrite a path with htaccess to different urls, based on calling path

I've been struggling to redirect to two different urls (files) based on what is in the path of the calling url, ie: example.com/rh/xxxxx/ -> user.php?a=xxxxx example.com/rh/xxxxx/yyyyy/ -> ...
1 vote
2 answers
40 views

.htaccess file adding trailing slash to URL

I have a blog, the pages are suppose to redirect to 'pretty URLS' like the following: https://www.example.org/blog-post-title I am using this code: RewriteEngine On # SSL RewriteCond %{HTTPS} off ...
2 votes
1 answer
64 views

Page 403 Forbidden for root directory for Deny from all in .htaccess

I have next .htaccess in root directory RewriteEngine on RewriteRule ^$ index.php [L] Order Deny,Allow Deny from all <Files index.php> Allow from all </Files> And get Page 403 Forbidden ...
0 votes
1 answer
13 views

NGINX nice url configuration

On NGINX I am trying to figure out how to keep nice URL in address bar after redirecting to the php file. I have tried all the mentioned below in the code and it works fine but no matter if use ...
2 votes
1 answer
38 views

Rewriting a url that matches a specific pattern

I have a .htaccess file with the following lines # ErrorDocument 404 /error/404.php Options All -Indexes -MultiViews RewriteEngine On # Allow urls to not include the .php extension RewriteCond %{...
user avatar
1 vote
2 answers
55 views

Does Wordpress' Rewrite API Break with RewriteBase other than Root?

I am having a horrible time trying to get Wordpress to work with basic rewrite rules. I have a php page in a plugin directory which needs to receive an id number so that it can lookup a related record....
2 votes
2 answers
57 views

Htaccess - remove .php extension and keep query

I've tried to remove the .php extension and keep the id query parameter, but I get a 404 error. This is the URL: example.com/folder/file.php?q=123 And I want it to be: example.com/folder/file/123 ...
  • 33
2 votes
1 answer
45 views

I'm getting jquery issue after writing .htacess

I'm writing .htaccess for my website. But after writing .htaccess for some pages, I found that redirection is working but css and jquery is not loading properly. I'm trying in localhost (xampp). Can ...
  • 31
0 votes
1 answer
46 views

Understanding the mod rewrite [SMF forum] [Pretty URLs Mod]

I have SMF installed in the root of my domains directory, with a portal acting as the front end of my website. Portal = Home [mydomain.com] SMF = Forum [mydomain.com/forum/] The Portal creates custom ...
  • 1
0 votes
0 answers
28 views

Rails: Use strings like "1", "1.2", "1.2.1", and "1.2.1a" as ID values of a model

I have a tree-like structure of the Web Content Accessibility Guidelines (WCAG) with my model wcag_elements. class WcagElement < ApplicationRecord acts_as_tree order: :position def to_param ...
1 vote
0 answers
27 views

Pretty faces does not work in spring-boot

i have a problem with Pretty Faces... I'm trying mapping the urls in the file "pretty-config.xml" but the file doesn't read. When i try to access an url the console says that "No ...
0 votes
0 answers
19 views

friendly url rewrite using .htaccess for a wordpress 'pretty url'

Trying to create a friendly url for a wordpress page 'pretty url'. We strive to rewrite and not redirect as we want people that visit the page to share this friendly url with others and not the '...
1 vote
1 answer
44 views

.htaccess rewrite specific page with backslash parameters

Please helt - I need a rewriteRule for a specific page with backslash paramters like: /page/parameter1/paramter2 Rewriterule to /anotherpage/paramter1/paramter2 tried this but i did not work: ...
  • 13
0 votes
1 answer
42 views

.htaccess does not activate 404 rule when entering wrong URLs

I have some rules working fine for accessing categories/subcategories/products But if I enter a non existing URL, instead of activate the 404 rule, access to principal.php also for images and other ...
  • 197
0 votes
0 answers
22 views

For every new page am creating, i want to write the below PT for rewrite the url without .html in it

For every new page am creating, i want to write the below PT for rewrite the url without .html in it and i can access the urls as below Apache: RewriteRule ^/firstchild/a $ /html/content/page/...
2 votes
1 answer
156 views

.htaccess pretty url for blog

I need a help with blog which is in core php and want to create a pretty url using .htaccess I have a folder called blog where there are two files. index.php which is a blog page post.php which ...
0 votes
0 answers
22 views

Url param friendly wordpress

I have in wordpress page whith: search-card/?order=desc&operation=sale I am use in htaccess: RewriteRule ^card/([a-zA-Z0-9]+)/([a-zA-Z0-9]+)$ search-card/?order=$1&operation=$2 [L,QSA] But no ...
1 vote
1 answer
28 views

.htaccess RewriteRule returning 404 unexpectedly

Rewriting is working using this htaccess file, but for some reason this new rule I created doesn't seem to be working. Here is the new rule: RewriteRule ^(.*)/(webapps|gamedev|digitalart)$ $1/index....
  • 18.9k
1 vote
1 answer
32 views

there is an error of htaccess configuration

Here is the link on the address bar: durnitibaz.com/news.php?n=ACC-raid-on-passport-office-3-brokers-jail-fine Here is the code of .htaccess : RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-d ...
0 votes
1 answer
42 views

Change Url in WebSphere

So the company I work for has a website in WebSphere, and all the url´s pages are too long and because of it are considerer trash by google. An example: https://www.victoria-seguros.pt/wps/portal/...
0 votes
1 answer
40 views

Getting list of friendlyURL and aspx page they belong to from RouteConfig.cs

I was wondering if there is an implemented way to get a list of objects from RouteConfig.cs, where I would have actual aspx page name and it's friendly URL equivalent. We work with the pagename in URL ...
0 votes
0 answers
26 views

I would like to rewrite a wordpress url

tried to rewrite a wordpress url address I need to convert this link: http://localhost/wordpress/landing-page?name=coursename to this one: http://localhost/wordpress/landing-page/coursename I tried to ...
  • 23
0 votes
1 answer
29 views

#PHP How do I create conditions for .htaccess

Sorry first, I use google translate. i have *.php domainname.com/filename.php domainname.com/file1.php?a=aa&b=bb domainname.com/file2.php?a=cc I want to change it to domainname.com/filename (NO ...
2 votes
1 answer
103 views

Htaccess rule for pretty url in sub folder html file

I am currently trying to make pretty url and I tried code from other post and was successful to rewrite using below code RewriteEngine on RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{...
  • 35
1 vote
1 answer
60 views

htaccess change subfolder root with subfolder

I have a website example.com with this structure: public_html/ .htaccess index.php project/ .htaccess public/ index.php the content of public_html/.htaccess is:...
  • 804
1 vote
1 answer
74 views

How to make an internal redirect using a file .htaccess?

I have the urls https://example.net/app/ref/user/u123456 https://example.net/app/ref/user/u123456/ Need redirect both url to https://example.net/app/ref/user/index.php?referral=u123456 How to do it ...
  • 165
1 vote
1 answer
43 views

How to make a nested folder of a subdomain subfolder the web root using .htaccess?

I'm trying to make a nested folder of a subdomain subfolder the web root in order for a test application to work properly. My current attempt using .htaccess: RewriteEngine on RewriteCond %{HTTP_HOST} ...
1 vote
2 answers
79 views

Htaccess - manage catch all in multiple directories and one single htaccess file

I'm trying to dispatch all traffic in multiple directories based on a specific keyword. I have the following directory structure: dotcom/ dotcom/directory1/ (with subdirs) dotcom/directory2/ (with ...
  • 1,437
1 vote
2 answers
35 views

RewriteRule to capture whole search string produces empty result

I have the following rule in .htaccess: RewriteRule ^order(.*)$ /index.php?p=order&product=$1 [L,NC] It's a simplification because later on I want to add order\?product=(.*) I access the website ...
  • 2,496
1 vote
2 answers
55 views

.htaccesss: allow to load resource files

I am trying to do the following. denied directly access to example.domain.com allow access from to example.domain.com from another.domain.com allow to load resource files (css, js) when the the user ...
1 vote
2 answers
84 views

how to change url to a clean url that works

I've been looking for an answer for my problem, however the things I tried didnt work out. What I've been trying to do is to create a beatiful url for this link: mywebsite.com/blog_template?slug_url=...
1 vote
2 answers
77 views

Long URL in php using htaccess

I have a very long URL: //domain/administration/registrar/term_detail.php?a_id=47 And I want to make it looks like: //domain/administration/registrar/detail/47 I have created an htaccess file in //...
  • 139
0 votes
2 answers
287 views

how to hide id = from url using htaccess file

I need the url from localhost/project/category?c=electronics to localhost/project/category/electronics I have tried RewriteRule ^category/([^/\.]+)?$ /category.php?c=$1 [L] RewriteRule ^category/+?$...
0 votes
1 answer
90 views

Nginx Friendly URL File Extension

I got my nginx.conf file: location ~* \.(jpg|jpeg|png|gif|ico|css|js|swf)$ { expires 7d; } location / { try_files $uri $uri/ @rewrite } location @rewrite { rewrite ^/([a-zA-Z0-9_-]+)?\/?(...
2 votes
1 answer
29 views

Use ReWriteEngine to redirect user profile page to a physical page

Good day, I want to rewrite my user id URL to a physical page on my website, see URL structure below: From: http://localhost:8888/report.mark1/user.php?id=341 To: http://localhost:8888/report.mark1/...
1 vote
1 answer
74 views

RewriteRule - remove params keys and keep values in address bar

RewriteEngine ON RewriteRule ^video$ video.php [L] the above line works example.com/video is interpret as example.com/video.php now I need example.com/video?id=5&s=lorem-ipsum to interpret ...
  • 723
0 votes
1 answer
497 views

Oracle Apex pretty URL

i need help for a problem. Before someone complain. I have post the same question in another forum but i didn't get any useful help there. https://community.oracle.com/tech/developers/discussion/...
2 votes
1 answer
115 views

Url redirect from one to another url using htaccess

Currently this is in my .htaccess file <IfModule mod_rewrite.c> RewriteEngine On RewriteBase /dev/ RewriteRule ^index\.php$ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{...
0 votes
1 answer
31 views

pretty url from play.php?v=lorem-ipsum to play/lorem-ipsum

I have this url: example.com/play.php?v=lorem-ipsum want it to be: example.com/play/lorem-ipsum here is my try: RewriteCond %{THE_REQUEST} \s/+play\.php\?v=([^\s&]+) [NC] RewriteRule ^ /%1? [R=...
  • 723
1 vote
1 answer
518 views

Second rewriterule is not working in htaccess and shows 404 not found page

Hi I have links like this: www.example.com/a-letter/a-1.html www.example.com/b-letter/b-1.html There are 3 files under the a letter and b-letter folder also. And i removed a-letter section with this ....
  • 196
0 votes
1 answer
173 views

how to redirect all files in a subfolder to root directory with htaccess

i have a directory like www.example.com/comments/a/word1.html I removed comments/a/ section and .html with htaccess from link. Under the a folder i have lots of files like word1.html, word2.html , ...
  • 196
2 votes
1 answer
65 views

how to remove query string from url using htaccess

Once my friend help me to solve this issue, I have written code like that. Where example.com/blog-detail?slug=slugvalue it goes to blog-detail.php and this url example.com/project?slug=test goes to ...
2 votes
1 answer
672 views

remove query string from url using htaccess

Can anyone help me to remove query string from URL using .htaccess Current URL xyz.com/blog-detail?slug=slugvalue I want this type of url xyz.com/blog-detail/slugvalue Basically I want slug value in ...
1 vote
2 answers
331 views

After removing .php and adding / file not loading (object not found)

I was trying to remove the .php extension and add a / as normal websites have. Example http://example.com/category/. I use .htaccess to remove .php. Here is the code: RewriteEngine On RewriteBase / # ...
2 votes
1 answer
42 views

redirect issue with rewrite rule $tag

Having some problems with this below; Specifically with the first rule. ^pages/articles/marketArticles\.php?id=31 I think here is the problem , So basically what I'm trying to achieve is that when a ...
  • 160
1 vote
1 answer
75 views

Rewriting URLs with htaccess, multiple parameters

I'm trying to rewrite something like this: https://mywebsite.com/pages/article.html?id=1&title=Title-Goes-Here into https://mywebsite.com/pages/article/1/Title-Goes-Here Using this Rewrite Rule ...
  • 167
2 votes
1 answer
273 views

issue with url parameters in htaccess

RewriteRule ^/pages/topic\.php?tag=$1 /topics/([^/]+) [R=301,L] RewriteRule ^topics/([^/]+)/?$ /pages/topic.php?tag=$1 [END] My problem is with the 301 redirect, I believe the problem is with the ...
  • 160
1 vote
2 answers
94 views

htaccess rewrite key/value pair params in url

I know this is very common question but I can't seem find any solution regarding in my problem. The folder structure looks like this: - rootProject - subfolder * .htaccess * index.php ...

1
2 3 4 5
25