My htaccess isn't quite working the way I want it to. I've seen some similar threads on here but they aren't quite what I need and I don't know enough yet about htaccess to modify the code to suit my needs.
This is what I have working so far: I've got all non-www URLs redirecting to www URLs and I'm doing an internal rewrite of all URLs...
i validate urls with utf-8 characters with a rewrite rule
RewriteRule ^([a-z]{2})/([a-z0-9-]{1,256})/([[:print:]]{1,256})$ index.php?language=$1&categories=$2&get_query=$3 [L]
$get_query is the point, this accepts: test!?!'"<>*+
but fails for accented chars as àèéìòù, or other utf-8
for example in wikipedia this works great: http://en...
I'm trying to make sure old url's aren't broken after the site's URL structure has changed from this:
http://www.domain.com/section/entry_name
to this:
http://www.domain.com/section/event_name/entry_name
But to make it a bit more complex, I'm using the segments to sort entries, for example:
http://www.domain.com/news/amazing_ev...
My host will not allow me to change the default folder of my primary domain. I have managed to Rewrite http://www.mysite.com to the real folder
public_html/mysite.com/www/
with the following code:
RewriteEngine On
RewriteRule ^$ /mysite.com/www/ [R=301,L]
This does successfully load my domain from the subfolder, but the url be...
Hello,
I have a server with php4 and pho5 support.
But i need to user this one to say server it must be parsed like a php5 file
AddType x-mapp-php5 .php .php5 .htm
.html
But now, my Zend Project have no access to the controllers...
public/index/search -> 404 Not found
On my local Server it works perfectly.. someone know...
I've been trying to create a specialised CMS, as none of the current open-source ones fit my needs for this project.
I did my research on Google, tried multiple times but haven't got very far with this project.
I'm trying to create a CMS for a TV/episode guide which is similar to this
where records expire and delete from the database a...
Hi all!
Need link, if it exist, to good and full .htaccess reference with examples.
Thanks.
...
What way it is to be to get two GET methods in the URL by htaccess?
RewriteRule ^adm/(.*)$ adm.php?mode=$1
I've used that for the example URL:
http://www.domain.com/adm/thismode
Now I want to get two methods like:
http://www.domain.com/adm/thismode/othermode
I've tried this:
RewriteRule ^adm/(.*)$/(.*)$ adm.php?mode=$1&othermod...
I have codeigniter installed at the root directory, and would like to have a subdirectory called "test" password protected using htaccess. I keep getting a "404 page not found" no matter what I try. The directory structure is:
/public_html
/css
/images
/system (codeigniter directory)
/test
.htaccess
.htacce...
Greetings all,
I need help combining some htaccess rewrites, these crazy regular expressions screw with my head.
So I have a folder structure something like this:
/www/mysite.com/page/member/friends.php
/www/mysite.com/page/video/videos.php
/www/mysite.com/page/messages/inbox.php
The URLs get rewritten to this:
...
For my Social Networking Site, I would like to build a facebook, or twitter similar URL rewriting naming convention.
Using Twitter as an example, they have pages labeled twitter.com/about and another page labeled twitter.com/{$username}
However, how do you differentiate between say a user who has registers on to our site as "about" the...
hi all.
how to change '?' to ','
this is now
index.php?page=2&search=stackoverflow
i want it to be like this
index.php/page,2/search,stackoverflow
any idea?
...
I'm working on a site that allows users to purchase digital content and have implemented a method that attempts to serve secure downloads.
I'm using CodeIgniter to force downloads like this:
$file = file_get_contents($path);
force_download("my_file_name.zip", $file);
Of course, I make sure the user has access to the file using a dat...
Hey,
I want to add a parameter to a URL but currently it isnt showing in the $_GET global.
A snippet from my htaccess file is as below:
RewriteRule ^account/blogs/([0-9]+)/([^\s?]+)/?$ /account/blog.php?blogId=$1 [L,QSA]
Then in my php code i want to add a link such as:
/account/blogs/1/ThisIsWhereTheTitleGoes?delete=1
The wil...
So what I need to do is make it so a html file (without the html extension) gets viewed as an html file.
I had this line:
AddType application/msword mypage
but apparently that last argument in .htaccess only supports extensions. Is there a way to have that thing work on a particular file?
...
I have a magento site and i need to have it redirect to https, i have the cert installed but i am not sure how to mod the htaccess file?
here is a copy of the root htaccess file
thanks
###########################################
## uncomment these lines for CGI mode
## make sure to specify the correct cgi php binary file name
## it migh...
I've scoured Google and this site pretty extensively, and I must be missing something. None of the suggestions I've found worked.
The problem is simple. I have links coming in to my site using http://domain.name./ but I want all visitors redirected to http://domain.name/ without the trailing dot.
How can I do that?
...
So I rewrote my paths to something like: URL/really/nice/paths/ using mod_rewrite rules like this:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?url=$1 [PT,L]
</IfModule>
The question is how could I rewrite the paths for js/css/image files...
Here is my current code:
RewriteCond %{HTTP_HOST} !^example\.com [NC]
#RewriteCond %{REQUEST_URI}!^something
RewriteCond %{HTTP_HOST} ^([^.]+)\.example\.com
RewriteRule (.*) something/%1/$1 [QSA,L]
My goal is to rewrite http://*.example.com/whatever to http://example.com/something/*/whatever, assuming * is the same for both and what...
I only want to password protect one file in a folder. How can I do this with .htaccess?
...