When someone types in myforum.com/forums.html I want it to display the main forum (myforum.com) with ...../forums.html in the url bar. But without actually having a forums.html file present on the server. Can this be accomplished with htaccess?
I'm trying to rewrite the urls across a site I'm developing, which pass get variables like the following:
localhost/link/link1/page.php?id=12 would look like: localhost/page/12
The first link in the htaccess file works fine, but the following ones don't (whatever the order, the first one works). I'm attaching a snippet of the file here:
I'm trying to change url structure so instead of /default/category/product.html it would show /category/product.html
With this line I've managed to do it on my personal blog
RedirectMatch 301 /default/(.*) //$1
But when I've implemented it on a customers Magento site it started showing double slashes like this //category/product.html and the whole template just collapsed .
I simply want to rewrite a hash # or other symbol to a question mark via htaccess. So any hash in the URL anywhere should internally rewrite to a ?. All I want is to remove ? from the URL really.
I have worked with mod_rewrite for years and never encountered this problem. I am converting html pages to a single php file and it works perfectly. I used htaccess the rewrite the urls to appear the same so that no links would be broken or lose SEO value.
The only problem is that my friend who also helped build the sites added different directories and within those directories are index.htm files that serve as a home page for the separate directory. Like /info/index.htm and /help/index.htm within the root directory. The problem is that for some reason my mod_rewrite directs to the main index.htm rewrite even if I include the whole path to the file. In htaccess I have this so far:
RewriteEngine on
RewriteRule index.htm$ index.php [L] RewriteRule servers.htm$ index.php?action=servers [L] RewriteRule movies.htm$ index.php?action=movies [L] However there is a directory named "info" and inside that directory it has an index.htm file and it seems to conflict with my first mod_rewrite. I tried using:
RewriteRule /info/index.htm$ index.php?action=info [L] and used other methods but none seem to work any ideas?
It should be a straight forward change. [URL] .... does not redirect to [URL]...... It simply tries to load /denver-cars/ and denver-cars is in the URL. Am I missing something here? I have tried moving it up and down the list of rules and have tried numerous types of flags to no avail. Everything else in the htacess works fine with out the line:
Options +FollowSymlinks RewriteEngine on RewriteBase / # Force www # Redirect google index dir's to new dir RewriteRule ^/(.*)-cars/ /newcars-in-$1/ [NC,R=301,L]
I want a user to type myUrl.com/JohnSmith and go to John Smith's homepage. His homepage is actually a dynamic page that is shared with all users which is myUrl.com/Shared.aspx?ID=1234. I have created a URL rewrite script which finds the folder specified (JohnSmith) and finds the user ID from the database. It then displays the Shared.aspx page for the proper ID.
This works on my local machine because it's using Visual Web Developer as the hosting engine so it executes ASP.NET for every page load. When I upload this to an online host using IIS it fails because there is no folder named JohnSmith. I get a 404 online where I would get the proper page on my machine.
I have tried to work with 3 hosts to make this happen and noone can get this to work. I really need to either know what to tell the host to change or find someone who knows how to do this. I am obviously willing to change hosts if that's what it takes.
Actually I am going to use phpprobid system and it has in built function for mod rewrite but I think it is for apache as if i turn it on I cant access pages
I'm facing some issues with hotlinking here. the htaccess do not work because users can still use their download manager to download the file without going to my site.
I've seen few sites that got tempoary url that changes every X times and that support download manager.
I'd like to use lighttpd on my server but it doesn't support url rewrites for wordpress. I have a VPS running on kloxo and i have 4 clients using WP2.71 with permalinks.
After searching i found something really nice: " Create a file called /etc/lighttpd/wp-rewrite.conf with the following contents:
I'm not even really sure if rewrite is what I need, but basically I have an alias/proxy setup on apache which points mysite.com/itunes/ to mysite2.com/pr/itunes/. My script php executes on the second server, so it assumes that the address should be mysite.com/pr/itunes/. I need to rewrite this to mysite.com/itunes. Here's my code:
RewriteEngine on RewriteBase / RewriteRule ^itunes/(.*).php$ pr/itunes/(.*).php
i'd like to use a code similar to the one below, to rewrite a sub directory to a subdomain. www.domain.com/aoa/info/ to info.domain.com and then error 301 if someone goes to www.domain.com/aoa/info/ directly
We have a server that is (unfortunately) running Windows. I'd like to change the strings from something like index.php?p=home to /home. I know how to do this on an Apache server, but I'm completely clueless for a Windows server running IIS.