I have some pages organised like this:
http://localhost/index.html
http://localhost/download.html
http://localhost/contact.html
And I need them changed to suit the following URL structure:
http://localhost/
http://localhost/download
http://localhost/contact
Without making sub directories and putting in pages as index.html. As far as I know .htaccess can be used for this, but I have no idea what I need to add to my .htaccess file to make this work.
Can anyone provide some help? Thanks.
Are you looking for this? Here's another page. And here's a discussion about it.
Related
I need to add a term to the URL's within a sub-directory of a website I'm working on to boost/enhance SEO. For example, http://www.domain.com/shop/product/ should go to http://www.domain.com/shop/product-SEO/ instead. I need to set this up in web.config and looked at examples on here but couldn't find anything similar. Any help?
The feature you are looking for is called URL Rewriting.
You should have a look at the following link, it will provide everything you need:
http://msdn.microsoft.com/en-us/library/ms972974.aspx
I've used Wayfinder in my template, eg:
[[Wayfinder? &startId=`8` ]]
and it was working fine until I turned on friendly urls (by going: System>>System Settings>>User Friendly URLS)
Now none of my links work. On top of this if I click the 'View' button from a resource page or enter the full url into a browser I get a 404 error.
Am I missing something in this process?
(ps Im using Revo 2.1.3)
Have you configured your .htaccess file? It's required for friendly urls. When you install MODX it's named ht.access, so you'll need to rename it to .htaccess.
If you've installed MODX in a subfolder you'll also need to set it here:
RewriteBase /folder-name
As Sean suggested, you'll also need to clear your cache to have your Wayfinder menu rebuilt.
it's probably your cache - just clear it and you should be fine.
Could somebody suggest the best way to redirect the non-www to the www in Joomla? I would normally do this in the .htaccess file but I'm unsure if it's the best way to do it with dynamic websites.
Many thanks
Shaun
There is an extension to achieve this, you can find it here on the Joomla extension directory
i would do this via the .htaccess file its the best way as then Google will just index your www.xxx site.
i have searched here, googling (with bing;)) and try all the things i have found but i
dont get it running.
I have a subfolder created on my webspace at discountasp.net like "MySite". Then i
made a virtual directory with the control panel. I published the Site with Visual
Studio to the path
http://blablabla.com/MySite/. My Domain is pointed to this path too.
It looks good but the links like /Home/About/ becomes /MySite/Home/About/ and thats
(of course) doesnt work.
How can i change that ? I think its an routing issue.
Please help me.
To create your URLs you should use
#Url.Action(actionName, controllerName)
This will use the routes you specified and it will create correct URLs.
You can also use
#Html.ActionLink(linkText, actionName, controllerName)
To include images and stylesheets use
#Url.Content("~/Content/...")
I got it. Pointing my Domain directly on the subfolder and defining a
Outbound rewrite rule on iis solves my problem.
I have a rails controller handling requests to www.mydomain/foo, now I want all traffic to www.mydomain/ (the domain root or homepage) to go to www.mydomain/foo. I asked a similiar question about how to do this with ReWrite, and haven't gotten an answer yet, but I would be happy also solving it in the controller so I have opened up this questrion to allow for either solution. Please help!
I think what you're looking for is map.root
What you pass for the options will depend on your controller/actions setup.
Edit - don't forget to delete the index.html file from the /public directory.