now i have set.php?mod=avatar set.php?mod=info
now i want make it set/mod this mean
useing this
RewriteRule ^set/(.*)/?$ set.php?mod=$1
its working
but when open it like that set/
its give me 404 error
how i can make it in one pharse
like that RewriteRule ^set/if this exsist ok if not i want it equal set.php onlly(.*)/?$ set.php?mod...
I am able to disable access to a file with .htaccess, but I don't know how to disallow multiple files to be viewed (directly, not from includes)
They are .php so I can't disable a file type (like the only tutorials online say..)
<FILES ... ?
</FILES>
Or something.. For example "home.php, file.php , test.php" how do I disallow acces...
Hey,
I am not being paid for this and I would like to know the quickest way to do the following. A former client has a page which only members can access. This page links to a number of galleries which he only wants members to access. The galleries are not protected by any kind of authentication.
What I assume is the quickest way to do...
Hi,
I've got a new site setup using CMSMadeSimple (PHP based) but I'm having problems 301 redirecting the old site URLs with the new setup.
I'm using a standard .htaccess file for the CMS which translates SEO friendly URLs like http://www.example.com/test.html into http://www.example.com?page=test, but I also need to redirect old URLs ...
My current htaccess file looks like this:
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f [NC]
RewriteCond %{REQUEST_FILENAME} !-d [NC]
RewriteRule ^(.*)$ index.php?page=$1 [L,QSA]
This works fine for me, however I want to try and reduce server load so I have added this line just below the RewriteEngine On line to stop processing...
I have a rule that will get the extension of every file from the url. I need to match all jpg, gif, png and bmp files. This is for a watermark application. Currently, it only matches jpg and Jpg. Can someone help me match all four extensions?
Here is what I currently have so far.
RewriteRule ^(.*\.[jJgG].*)$ /test.php?i=$1
...
I am trying to write an .htaccess rule that appends www. to the domain and s to http if required but I can't seem to find a rule or set of rules that works for each case.
The cases are...
\https://www.site.com - should just work
\http://www.site.com - should go to \https://www.site.com
\http://site.com - should go to \https://www.si...
This is working:
RewriteRule ^([a-z]{2}/){0,1}showCategory/([0-9]*)/([0-9]*)(/{0,1})$ /main.php?id=$2&il[lang]=$1&page=$3 [L]
with this URL:
http://localhost/showCategory/590/10
Now I want to work with this too:
http://localhost/showCategory/590/transport/10
The rule I tried:
RewriteRule ^([a-z]{2}/){0,1}showCate...
I need assistance with a redirect rule. It's quite simple. The catch is, I need to use the fully-qualified URL since I am including subdomains. Here's what I've got so far, but it's not working.
Redirect 301 http://pc.gamezone.com/oldpage.html http://pc.gamezone.com/downloads
Redirect 301 http://xbox360.gamezone.com/oldpage.html http:/...
I have built a few themes and noticed that the 404 pages, once uploaded to my server. never appear. They always do on my localhost setup, and even themes for others have worked.
I see no reason for it not to work, I have mod_rewrite enabled for the pretty permalinks but the 404 redirection seems not to want to work.
Is this a known iss...
Lets say you have lots of html, css, js, img and etc files within a directory on your server. Normally, any user in internet-land could access those files by simply typing in the full URL like so: http://example.com/static-files/sub/index.html
Now, what if you only want authorized users to be able to load those files? For this example, ...
RewriteRule ^([a-z]{2}/){0,1}showCategory/([0-9]*)/[a-z\-_0-9\+]*/mp/(.*)(/{0,1})$ /main.php?id=$2&il[lang]=$1&$3 [L]
RewriteRule ^([a-z]{2}/){0,1}showCategory/([0-9]*)/[a-z\-_0-9\+]*/(.*)/mp/(.*)(/{0,1})$ /main.php?id=$2&il[lang]=$1&page=$3&$4 [L]
RewriteRule ^([a-z]{2}/){0,1}showCategory/([0-9]*)(/{0,1})/[a-z\-_0-9\+]*$ /main.php?id=...
I'm trying to put something with this, whenever I go to a page like:
www.site.com/character.php?id=3
I want the mod rewrite to change it to:
www.site.com/character/Jim_Carrey
Which of course, the ID is the row of the character name...
For that kind of example... I've tried to work with it, but don't seem to get most of the productio...
Like described in the title i would like to have clean URLs with mod_rewrite, sadly i didnt manage to write the fitting regex to get the job done i am experimenting with:
1.try:
RewriteRule ^([a-z]*)$ /index.html?city=$1 [NC,L]
2.try:
RewriteRule ^(.*)$ /index.html?city=$1 [NC,L]
But none is working properly, even less when it com...
I'm using the .htaccess file below to force a redirect to a "language prefix" if none is found in the url. So if domain.com/news is typed it redirects to domain.com/en/news - this works fine.
This rule should not be applied to certain folders like images, swf and myphp. It works fine for the first two, so when I access domain.com/swf I ...
RewriteRule ^([a-z]{2}/){0,1}showCategory/([0-9]*)/[a-z\-_0-9\+]*/mp/(.*)(/{0,1})$ /main.php?id=$2&il[lang]=$1&$3 [L]
RewriteRule ^([a-z]{2}/){0,1}showCategory/([0-9]*)/[a-z\-_0-9\+]*/(.*)/mp/(.*)(/{0,1})$ /main.php?id=$2&il[lang]=$1&page=$3&$4 [L]
RewriteRule ^([a-z]{2}/){0,1}showCategory/([0-9]*)(/{0,1})/[a-z\-_0-9\+]*$ /main.php?id=...
Can anyone tell me how to write an .htaccess mod-rewrite so the url displays ONLY the domain name at all times? No matter which page the user is in, I just want to show the domain name.
Thanks in advance.
...
All,
My Zend framework Application structure is like this:
billingsystem
-application
-design
--css
--struct.css
--icons
--styles
--images
--js
--common
--thirdparty
-public
--index.php
--.htaccess
-library
-- Zend
My Apache VHost is like this:
<VirtualHost *:80>
ServerAdm...
Hello,
i have to edit an existing web project. This project has only html pages and links to html pages.
Ex. from foobar.html is a link to bar.html.
Now I have to edit several pages and change the url to bar.php.
I dont want to change every
...
I am currently running Apache2 on my local machine, installed with the latest version of Ubuntu.
I am trying to get basic URL rewriting working by using the .htaccess file.
The file "http://localhost/page.php?=home" does exist, and the location "/doesnotexist/home" does not.
I would like to have the first page be loaded when the secon...