Questions tagged [clean-urls]

Semantic URLs (aka Clean URLs) are purely structural URLs that do not contain a query string and instead contain only the path of the resource.

Semantic URLs (aka Clean URLs) are purely structural URLs that do not contain a query string and instead contain only the path of the resource.

Related tag's:

391 questions
2
votes
3 answers

clean URL using .htaccess

I'm trying to redirect the links on my domain. What I'm trying to achieve is: When the user clicks on a link to mydomain.com/index.php?dir=myfolder I want him to be redirected to exactly this URL but the browser bar is supposed to show this…
basbebe
  • 567
  • 1
  • 9
  • 25
2
votes
3 answers

The clean URL test failed in drupal 7

The clean URL test failed. It was working correctly on my local computer, when I uploaded it to server I got this message and I could not enable the clean url. What should I do to enable it? I have uploaded the htaccess also.
Varada
  • 16,026
  • 13
  • 48
  • 69
2
votes
1 answer

htaccess clean URL's what's the best way to do it?

I'm working on clean Url's for my website and I noticed that what you find on the internet is pretty much about rewriting your clean urls to the url that your server can work with. So something like this: www.domain.com/profile/username -->…
Juvlius
  • 237
  • 1
  • 2
  • 6
2
votes
2 answers

.htaccess/php cleanURL's variable number of variables in a variable order

I've found a number of solutions on stackoverflow on rewriting urls with a variable number of variables. But wasn't able to find anything on the situation where these variables can occur in a variable order. In my case I've a page with 4 potential…
Juvlius
  • 237
  • 1
  • 2
  • 6
2
votes
1 answer

Mod_Rewrite Rule to remove .php file extensions on localhost

I'm currently working on a site on my local machine (Wamp) and I've been trying clean up my urls with htaccess, but I can't seen to get it to work..I don't know much (anything really) about Apache. Important?: I'm using WAMP Server I Have turned on…
Roger Williams
  • 159
  • 2
  • 7
  • 15
2
votes
1 answer

Nginx with Clean Urls, Get Parameters, and PHP-FPM

I was curious to know if it was possible to somehow configure nginx so that it will parse url arguments without specifying .php at the end of the filename before the arguments are sent. For example, let's say I have an account module which…
zeboidlund
  • 9,731
  • 31
  • 118
  • 180
1
vote
3 answers

Mod_Rewrite and Clean URLs Partially Working

Edit #2: i disabled my 404 page and the default not found page says that it's looking for a url with .php after it: "The requested URL /events/2012.php was not found on this server" So now i believe it's looking for an actual file, when it doesn't…
n1ch0la5
  • 89
  • 1
  • 1
  • 5
1
vote
3 answers

Clean URLS/.htaccess

RewriteEngine on RewriteBase / RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ index.php?q=$1 [L,QSA Looking for feedback Goal: I am trying to enable "Clean URLs" on a Drupal…
yatakaka
  • 357
  • 1
  • 4
  • 10
1
vote
0 answers

Rewritten Clean URLs not showing as default URLs

I have created rewritten URLs for my site using .htaccess file. Here is the content of the file. RewriteEngine On RewriteRule ^([a-zA-Z0-9]+)/([a-zA-Z0-9]+)/([a-zA-Z0-9]+)/([a-zA-Z0-9]+)$…
Visualizer7
  • 325
  • 1
  • 5
  • 13
1
vote
1 answer

Mod-Rewrite Rule - Unwanted 301 Redirect

Possible Duplicate: .htaccess, Clean URL, unwanted 301 redirect, 1AND1 Mod_Rewrite is redirecting. RewriteRule ^viewPage/([^/]+)/([^/]+)/$ /viewPage.php?ID=$1&Title=$2 [NC,L] Typing into browser: www.domain/viewPage/123/abc/ the browser loads…
Tush
  • 59
  • 1
  • 4
1
vote
1 answer

Using relative urls when using "clean urls"?

I direct all url requests to a front controller. The url requests look something like example.com/controller/action/etc. The problem is, using relative urls within the program. This works fine if there is only one slash in the url request, but if…
dqhendricks
  • 19,030
  • 11
  • 50
  • 83
1
vote
2 answers

Error in htaccess file when clean url of php file

When I open this page of my website it gives a 500 error: single-portfolio/3/bizdb-business-directory-data-scraping-uk- My .htaccess file: RewriteEngine on RewriteCond %{THE_REQUEST} /([^.]+)\.php [NC] RewriteRule ^ /%1 [NC,L,R] RewriteCond…
1
vote
1 answer

Shorten URL in Swift iOS with your custom website domain name

I want to shorten a share URL I have in my app when users share a shop. I want a methodology or an API that allows me to shorten the URL to make it look clean but with my website's name. for instance: longURL:…
motionless570
  • 925
  • 1
  • 10
  • 26
1
vote
1 answer

Cleaning up urls and duplicate pages (forcing canonical from start).

I am trying to find ways do the following via htaccess. Remove (.php) extension Remove trailing slashes (/) Redirect former (.php) page to non-php page Redirect all traces of the root index to the root domain Here is an example of the directory…
ThomasReggi
  • 55,053
  • 85
  • 237
  • 424
1
vote
1 answer

Problems with clean URLs .htaccess - page not found

I'm trying to make clean urls with php and im getting some errors. Hope someone can help. My .htaccess is as follows: # Use PHP5 Single php.ini as default AddHandler application/x-httpd-php5s .php # this is the initialization # For security reasons,…
Dan Stern
  • 2,155
  • 8
  • 26
  • 38