Hello,
I am using php to develop an application, i have different set of url's if seo is enabled and different set if seo is disabled. ex:
SEO Enabled = hxxp://www.website.com/page/about_us
SEO Disabled = hxxp://www.website.com/page.php?about_us
Stylesheet url = hxxp://www.website.com/style.css
The problem is
If seo is disabled i h...
Hi! I got problems with the following two lines:
RewriteCond %{REQUEST_FILENAME}.html -f
RewriteRule ^(.+[^/])$ /$1.html [L]
Goal: Redirecting "domain.tld/test/" (only if test.html exists) so that it outputs the contents of "domain.tld/test.html".
How to make this case-insensitive: "domain.tld/Test" -> domain.tld/test.html **
How to...
Hello,
I'm having some difficulties with mod_rewrite. My directory structure (part of it) is:
index.php
.htaccess
app
controllers
models
views
...
public
javascripts
stylesheets
foo
bar
So, as you can see, all static files are in app/public. That's the reason I would like to route requests like:
http://...
Currently my .htaccess looks like this...
Options +FollowSymLinks
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ $1.php [L,QSA]
It currently changes any /xxx.php file into /xxx. This is great for SEO. However, I also want Mr. htaccess to convert certain ...
For SEO friendly urls i'm using this expression:
RewriteRule ^([0-9]+).([^/]+)$ index.php?id=$1&titel=$2
The url is domain.com/55-page-title and it works perfect.
Now i have to determine different languages and my url should look like domain.com/de/55-seitentitel. I've no idea how to rewrite regular expression in .htaccess file.
Rew...
Hey guys, please take a look at my .htaccess:
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteRule ^([_0-9a-zA-Z-]+/)?wp-admin$ $1wp-admin/ [R=301,L]
RewriteRule ^([_0-9a-zA-Z-]+/)?(wp-(content|admin|includes).*) $2 [L]
RewriteRule ^([_0-9a-zA-Z-]+/)?(.*\.php)$ $2 [L]
Rewri...
Hi,
I agreed to host a file for an online community, but I've since changed my site around so that it's now hosting a wordpress blog. What I'd like is to not break the existing URL to this one file, so, for example, when people navigate to the URL where file is being hosted, e.g. myblog.com/path/to/file, I'd like Apache to handle the UR...
I have several files in a directory that require different types of authentication. For authentication we use cosign which means we have to define the user groups or users that have access to a directory in an .htaccess file. Is there a way that in my PHP code I can define different rules? I need to set a rule like Require user bjensen. ...
Hey,
I'd like to know why the following htaccess file produces a 500 error:
<IfModule !mod_rewrite.c>
ErrorDocument 500 "Your_Server_Is_Not_Compatible: Apache does not have mod_rewrite loaded. Please check your Apache setup."
RedirectMatch 302 .* index.php
</IfModule>
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteRule ^(...
I was thinking of setting up my website with a file called master.php and using .htaccess and URL rewriting I would transform
http://mysite.com/About into http://mysite.com/master.php?selected=About
Which would allow me to setup the about page. Is it a bad idea to have one master page that creates dynamic pages?
...
I need to figure out the code on my .htaccess for the following.
Redirect url http://www.mydomain.com/somekw to http://www.mydomain.com/differentkw
also http://www.mydomain.com/somekw?sort=rating&order=ASC to http://www.mydomain.com/differentkw
I have read up about .htaccess but I have very little skills, hopefully someone can he...
There is something strange going on. I am using Zend Framework on a subfolder in a site. I have a modular structure to my website, so the links consist of module names (www.xx.com/modulename). I have created a .htaccess file for the root dir, so that all of the requests would be routed to the public dir.
When i try to access the homepa...
I have a page like
index.php?username=thurein
i need to get with subdomain like
thurein.mydomain.com
how could i get it?
...
I'd like to auto_prepend_file all my js files with:
var SITE_ROOT = 'http://www.mydomain.com';
Can this be done in .htaccess like it can for php files, if so, how?!!!
...
At the moment, I have a standard installation of Wordpress 3.0, and the .htaccess file looks like this:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
I want to rewrite URLs so that I...
Hi all,
For my website i want to rewrite my url to:
www.xxx.com/en/index.php instead of www.xxx.com/index.php?language=en
www.xxx.com/nl/index.php instead of www.xxx.com/index.php?language=nl
www.xxx.com should be www.xxx.com/en/
This actually works i have added these rewrite rules
RewriteCond %{HTTP_HOST}%{REQUEST_URI} ^www\...
I am developing a Joomla Component which will allow visitors to download a sound file (be it mp3, or wave, does not matter). Those files are managed in the admin interface and can be unpublished in there.
Therefore, it seems that placing them in the assets section is not an option, as it would make them accessible directly from the serv...
Hi! I'm trying to match a a bunch of redirects for my website with basically moved to a different folder on the server. I need to make http://www.site.com/index.php?page=anypage go to http://www.site.com/newfolder/index.php?page=anypage. The thing is http://www.site.com/index.php and http://www.site.com/index.php?page=home should remain ...
When I link to a file in a directory, I want to open that file as a param in a php program.
For example, I have a directory temp, and files aa.txt, bb.txt, and test.php. When I link to aa.txt it should be handled like test.php?f=aa.txt.
What do I change in the .htaccess file?
the code in the test.php
<?php
$f=$_GET['f'];
if(@file_exi...
When working with htaccess files on Windows, is it possible to save the file as .htaccess ? (Rather than having to rename on LAMP server)
...