Currently I am creating a project with CodeIgniter that is contained within a subdirectory of my domain. For this example we'll call it domain.com/test.
I also have Wordpress installed on this domain, and all of its files are in the root. For instance, if you navigate to my domain.com then it pulls up the Wordpress blog. I currently hav...
so enabling mod_rewrite module for Apache is relativelly straightforward, it involves adding a few lines of configuration in the main apache configuration file (httpd.conf) which is currently located in /etc/httpd/conf/httpd.conf
looking at this file I read the header at the top of it which says that the file itself is generated by cpan...
Instead of www.example.com/author/xyz, I want to use www.example.com/artist/xyz.
I was hoping it was as easy as copying author.php to artist.php in my theme directory, but no such luck. Where does wordpress handle the special processing for the author archive pages?
.htaccess rewriting is another option, but I wasn't able to get anythi...
Hello,
I'm trying to install Symfony on a shared server and am attempting to duplicate the httpd.conf command:
# Be sure to only have this line once in your configuration
NameVirtualHost 127.0.0.1:8080
# This is the configuration for your project
Listen 127.0.0.1:8080
<VirtualHost 127.0.0.1:8080>
DocumentRoot "/home/sfproject/web"
...
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...
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...
I have the following URL which is correct...
http://www.mydomain.co.uk/cask-beer/wells-and-youngs
but i need it to render this page:
http://www.mydomain.co.uk/cask-beer?catID=4
This is my current .htaccess which serves other pages correctly already. I want to add something to manage this other rule. I had an attempt where you can cas...
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?
...
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...
What I'm trying to achieve:
1) http://localhost/en/script.php?param1=random is mapped to http://localhost/script.php?param1=random&language=English
This has to work always.
2) http://localhost/en/random/text/here will be mapped to http://localhost/categories.php?term=random/text/here
This has to work if random/text/here is 40...
It's been a while since I've done anything with mod_rewrite, so I was hoping I could help some help on this.
I would like a URL like this: http://example.com/qwerty/xyz/ to be directed to querty.xyz.php, where the number of slashes and alpha characters between the slashes is not explicitly set.
...
Hello,
Originally I had following .htaccess file:
php_value display_errors 1
php_value error_reporting 7
AddDefaultCharset utf-8
Options -Indexes
<Files ~ ".*\.(info|tpl)$">
Order allow,deny
Deny from all
</Files>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteR...
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...
Hi,
I'm trying to use mod_rewrite to map multiple domains to different servlets on one host.
Example:
www.dom1.com -> 192.168.1.n/dom1
www.dom2.com -> 192.168.1.n/dom2 ...
I'm using the mod_rewrite and mod_proxy and VirtualHost directive but it seems that the reverse mapping via ProxyPassReverse doesn't work as I expected.
Pr...
I want to rewrite from http://example.com/blah/<something>/<somethingelse> to http://<something>.example.com/<somethingelse>, but only if the request is not an internal redirect. How can I achieve this effect? I know I can use %{THE_REQUEST}, but I can't seem to find any good examples.
Thanks for the help!
...
Hi,
I have an environment where in there are two tomcat instances running the same application. What I would need is an apache load balancing the url requests to these tomcat instances using the mod_rewrite rules.
I know that we can do this with mod_jk already but have observed that the mod_jk s an overhead in terms of performance so f...
I'm taking over a website for a client that is running on a custom built CMS (that I didn't write). I don't mess with .htaccess files usually because a lot of the hosting I do is on IIS, or I used WordPress as a CMS and don't have to worry about messing with the .htaccess file. Here's the contents of the file:
RewriteEngine on
Rewrite...